Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Repeating decimal</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Repeating_decimal"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Repeating_decimal rootpage-Repeating_decimal skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Repeating decimal</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">"Repeating fraction" redirects here; not to be confused with <a href="Continued_fraction" title="Continued fraction">continued fraction</a>.</div>
<style data-mw-deduplicate="TemplateStyles:r1305433154">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1248332772">
/* start https://en.wikipedia.org/ */


.mw-parser-output .multiple-issues-text{width:95%;margin:0.2em 0}.mw-parser-output .multiple-issues-text>.mw-collapsible-content{margin-top:0.3em}.mw-parser-output .compact-ambox .ambox{border:none;border-collapse:collapse;background-color:transparent;margin:0 0 0 1.6em!important;padding:0!important;width:auto;display:block}body.mediawiki .mw-parser-output .compact-ambox .ambox.mbox-small-left{font-size:100%;width:auto;margin:0}.mw-parser-output .compact-ambox .ambox .mbox-text{padding:0!important;margin:0!important}.mw-parser-output .compact-ambox .ambox .mbox-text-span{display:list-item;line-height:1.5em;list-style-type:disc}body.skin-minerva .mw-parser-output .multiple-issues-text>.mw-collapsible-toggle,.mw-parser-output .compact-ambox .ambox .mbox-image,.mw-parser-output .compact-ambox .ambox .mbox-imageright,.mw-parser-output .compact-ambox .ambox .mbox-empty-cell,.mw-parser-output .compact-ambox .hide-when-compact{display:none}


/* end https://en.wikipedia.org/ */
</style>
<p>A <b>repeating decimal</b> or <b>recurring decimal</b> is a <a href="Decimal_representation" title="Decimal representation">decimal representation</a> of a number whose <a href="Numerical_digit" title="Numerical digit">digits</a> are eventually <a href="Periodic_function" title="Periodic function">periodic</a> (that is, after some place, the same sequence of digits is repeated forever); if this sequence consists only of zeros (that is if there is only a finite number of nonzero digits), the decimal is said to be <i>terminating</i>, and is not considered as repeating.
</p><p>It can be shown that a number is <a href="Rational_number" title="Rational number">rational</a> if and only if its decimal representation is repeating or terminating. For example, the decimal representation of <style data-mw-deduplicate="TemplateStyles:r1214402035">
/* start https://en.wikipedia.org/ */


.mw-parser-output .sfrac{white-space:nowrap}.mw-parser-output .sfrac.tion,.mw-parser-output .sfrac .tion{display:inline-block;vertical-align:-0.5em;font-size:85%;text-align:center}.mw-parser-output .sfrac .num{display:block;line-height:1em;margin:0.0em 0.1em;border-bottom:1px solid}.mw-parser-output .sfrac .den{display:block;line-height:1em;margin:0.1em 0.1em}.mw-parser-output .sr-only{border:0;clip:rect(0,0,0,0);clip-path:polygon(0px 0px,0px 0px,0px 0px);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}


/* end https://en.wikipedia.org/ */
</style><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span> becomes periodic just after the <a href="Decimal_point" class="mw-redirect" title="Decimal point">decimal point</a>, repeating the single digit "3" forever, i.e. 0.333.... A more complicated example is <span class="sfrac">⁠<span class="tion"><span class="num">3227</span><span class="sr-only">/</span><span class="den">555</span></span>⁠</span>, whose decimal becomes periodic at the <i>second</i> digit following the decimal point and then repeats the sequence "144" forever, i.e. 5.8144144144.... Another example of this is <span class="sfrac">⁠<span class="tion"><span class="num">593</span><span class="sr-only">/</span><span class="den">53</span></span>⁠</span>, which becomes periodic after the decimal point, repeating the 13-digit pattern "1886792452830" forever, i.e. 11.18867924528301886792452830....
</p><p>
The infinitely repeated digit sequence is called the <b>repetend</b> or <b>reptend</b>. If the repetend is a zero, this decimal representation is called a <b>terminating decimal</b> rather than a repeating decimal, since the zeros can be omitted and the decimal terminates before these zeros.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> Every terminating decimal representation can be written as a <a href="Decimal_fraction" class="mw-redirect" title="Decimal fraction">decimal fraction</a>, a fraction whose denominator is a <a href="Power_(math)" class="mw-redirect" title="Power (math)">power</a> of 10 (e.g. <span class="nowrap">1.585 = <span class="sfrac">⁠<span class="tion"><span class="num">1585</span><span class="sr-only">/</span><span class="den">1000</span></span>⁠</span></span>); it may also be written as a <a href="Ratio" title="Ratio">ratio</a> of the form <span class="sfrac">⁠<span class="tion"><span class="num"><i>k</i></span><span class="sr-only">/</span><span class="den">2<sup><i>n</i></sup>·5<sup><i>m</i></sup></span></span>⁠</span> (e.g. <span class="nowrap">1.585 = <span class="sfrac">⁠<span class="tion"><span class="num">317</span><span class="sr-only">/</span><span class="den">2<sup>3</sup>·5<sup>2</sup></span></span>⁠</span></span>). However, <i>every</i> number with a terminating decimal representation also trivially has a second, alternative representation as a repeating decimal whose repetend is the digit "9". This is obtained by decreasing the final (rightmost) non-zero digit by one and appending a repetend of 9. Two examples of this are <a href="0.999..." title="0.999..."><span class="nowrap">1.000... = 0.999...</span></a> and <span class="nowrap">1.585000... = 1.584999...</span>. (This type of repeating decimal can be obtained by long division if one uses a modified form of the usual <a href="Division_algorithm" title="Division algorithm">division algorithm</a>.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>)
</p><p>Any number that cannot be expressed as a <a href="Ratio" title="Ratio">ratio</a> of two <a href="Integer" title="Integer">integers</a> is said to be <a href="Irrational_number" title="Irrational number">irrational</a>. Their decimal representation neither terminates nor infinitely repeats, but extends forever without repetition (see <a href="#Every_rational_number_is_either_a_terminating_or_repeating_decimal">§&nbsp;Every rational number is either a terminating or repeating decimal</a>). Examples of such irrational numbers are <a href="Square_root_of_2" title="Square root of 2"><span class="texhtml"><span class="nowrap">√<span style="border-top:1px solid; padding:0 0.1em;">2</span></span></span></a> and <a href="Pi" title="Pi"><span class="texhtml mvar" style="font-style:italic;">π</span></a>.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Background">Background</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Notation">Notation</h3></div>

<p>There are several notational conventions for representing repeating decimals. None of them are accepted universally.
</p>
<table class="wikitable" style="margin-left: auto; margin-right: auto; border: none;">
<caption>Different notations with examples
</caption>
<tbody><tr>
<th colspan="2"><a href="Fraction" title="Fraction">Fraction</a>
</th>
<th><a href="Vinculum_(symbol)" title="Vinculum (symbol)">Vinculum</a>
</th>
<th>Dots
</th>
<th><a href="Parentheses" class="mw-redirect" title="Parentheses">Parentheses</a>
</th>
<th>Arc
</th>
<th><a href="Ellipsis" title="Ellipsis">Ellipsis</a>
</th></tr>
<tr>
<td style="text-align:center;border-right:none;"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span></td>
<td style="padding:0;border-left:none;">
</td>
<td>0.<span style="text-decoration:overline;">1</span>
</td>
<td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span>
</td>
<td>0.(1)
</td>
<td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: var(--color-base,#202122); border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">1</span>
</td>
<td>0.111...
</td></tr>
<tr>
<td style="text-align:center;border-right:none;"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span></td>
<td style="padding:0;border-left:none;">= <span class="sfrac">⁠<span class="tion"><span class="num">3</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">3</span>
</td>
<td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">3</span></span></span>
</td>
<td>0.(3)
</td>
<td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: var(--color-base,#202122); border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">3</span>
</td>
<td>0.333...
</td></tr>
<tr>
<td style="text-align:center;border-right:none;"><span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span></td>
<td style="padding:0;border-left:none;">= <span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">6</span>
</td>
<td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">6</span></span></span>
</td>
<td>0.(6)
</td>
<td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: var(--color-base,#202122); border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">6</span>
</td>
<td>0.666...
</td></tr>
<tr>
<td style="text-align:center;border-right:none;"><span class="sfrac">⁠<span class="tion"><span class="num">9</span><span class="sr-only">/</span><span class="den">11</span></span>⁠</span></td>
<td style="padding:0;border-left:none;">= <span class="sfrac">⁠<span class="tion"><span class="num">81</span><span class="sr-only">/</span><span class="den">99</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">81</span>
</td>
<td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">8</span></span></span><span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span>
</td>
<td>0.(81)
</td>
<td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: var(--color-base,#202122); border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">81</span>
</td>
<td>0.8181...
</td></tr>
<tr>
<td style="text-align:center;border-right:none;"><span class="sfrac">⁠<span class="tion"><span class="num">7</span><span class="sr-only">/</span><span class="den">12</span></span>⁠</span></td>
<td style="padding:0;border-left:none;">= <span class="sfrac">⁠<span class="tion"><span class="num">525</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span>
</td>
<td>0.58<span style="text-decoration:overline;">3</span>
</td>
<td>0.58<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">3</span></span></span>
</td>
<td>0.58(3)
</td>
<td>0.58<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: var(--color-base,#202122); border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">3</span>
</td>
<td><span style="white-space:nowrap">0.58<span style="margin-left:0.25em">333</span></span>...
</td></tr>
<tr>
<td style="text-align:center;border-right:none;"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span></td>
<td style="padding:0;border-left:none;">= <span class="sfrac">⁠<span class="tion"><span class="num">142857</span><span class="sr-only">/</span><span class="den">999999</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">142857</span>
</td>
<td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span>4285<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">7</span></span></span>
</td>
<td>0.(142857)
</td>
<td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: var(--color-base,#202122); border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">142857</span>
</td>
<td><span style="white-space:nowrap">0.142857<span style="margin-left:0.25em">142857</span></span>...
</td></tr>
<tr>
<td style="text-align:center;border-right:none;"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">81</span></span>⁠</span></td>
<td style="padding:0;border-left:none;">= <span class="sfrac">⁠<span class="tion"><span class="num">12345679</span><span class="sr-only">/</span><span class="den">999999999</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">012345679</span>
</td>
<td>0.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">0</span></span></span>1234567<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">9</span></span></span>
</td>
<td>0.(012345679)
</td>
<td>0.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: var(--color-base,#202122); border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">012345679</span>
</td>
<td><span style="white-space:nowrap">0.012345679<span style="margin-left:0.25em">012345679</span></span>...
</td></tr>
<tr>
<td style="text-align:center;border-right:none;"><span class="sfrac">⁠<span class="tion"><span class="num">22</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span></td>
<td style="padding:0;border-left:none;">= <span class="sfrac">⁠<span class="tion"><span class="num">3142854</span><span class="sr-only">/</span><span class="den">999999</span></span>⁠</span>
</td>
<td>3.<span style="text-decoration:overline;">142857</span>
</td>
<td>3.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span>4285<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">7</span></span></span>
</td>
<td>3.(142857)
</td>
<td>3.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: var(--color-base,#202122); border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">142857</span>
</td>
<td><span style="white-space:nowrap">3.142857<span style="margin-left:0.25em">142857</span></span>...
</td></tr>
<tr>
<td style="text-align:center;border-right:none;"><span class="sfrac">⁠<span class="tion"><span class="num">593</span><span class="sr-only">/</span><span class="den">53</span></span>⁠</span></td>
<td style="padding:0;border-left:none;">= <span class="sfrac">⁠<span class="tion"><span class="num">111886792452819</span><span class="sr-only">/</span><span class="den">9999999999999</span></span>⁠</span>
</td>
<td>11.<span style="text-decoration:overline;">1886792452830</span>
</td>
<td>11.<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">1</span></span></span>88679245283<span class="sfrac nowrap;"><span style="display:none; display:inline-block; text-align:center;"><span style="display:block; line-height:0.8em; font-size:70%;">.</span><span style="display:block; line-height:1em;">0</span></span></span>
</td>
<td>11.(1886792452830)
</td>
<td>11.<span style="line-height: 1.2em; padding-top: 0.2em; border: 1px solid transparent; border-top-color: var(--color-base,#202122); border-top-left-radius: 50% 25%; border-top-right-radius: 50% 25%;">1886792452830</span>
</td>
<td><span style="white-space:nowrap">11.1886792452830<span style="margin-left:0.25em">1886792452830</span></span>...
</td></tr></tbody></table>
<ul><li><b>Vinculum</b>: In the <a href="United_States" title="United States">United States</a>, <a href="Canada" title="Canada">Canada</a>, <a href="India" title="India">India</a>, <a href="France" title="France">France</a>, <a href="Germany" title="Germany">Germany</a>, <a href="Italy" title="Italy">Italy</a>, <a href="Switzerland" title="Switzerland">Switzerland</a>, the <a href="Czech_Republic" title="Czech Republic">Czech Republic</a>, <a href="Slovakia" title="Slovakia">Slovakia</a>, <a href="Slovenia" title="Slovenia">Slovenia</a>, <a href="Chile" title="Chile">Chile</a>, and <a href="Turkey" title="Turkey">Turkey</a>, the convention is to draw a horizontal line (a vinculum) above the repetend.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></li>
<li><b>Dots</b>: In some Islamic countries, such as <a href="Bangladesh" title="Bangladesh">Bangladesh</a>, <a href="Malaysia" title="Malaysia">Malaysia</a>, <a href="Morocco" title="Morocco">Morocco</a>, <a href="Pakistan" title="Pakistan">Pakistan</a>, <a href="Tunisia" title="Tunisia">Tunisia</a>, <a href="Iran" title="Iran">Iran</a>, <a href="Algeria" title="Algeria">Algeria</a> and <a href="Egypt" title="Egypt">Egypt</a>, as well as the <a href="United_Kingdom" title="United Kingdom">United Kingdom</a>, <a href="New_Zealand" title="New Zealand">New Zealand</a>, <a href="Australia" title="Australia">Australia</a>, <a href="South_Africa" title="South Africa">South Africa</a>, <a href="Japan" title="Japan">Japan</a>, <a href="Thailand" title="Thailand">Thailand</a>, India, <a href="South_Korea" title="South Korea">South Korea</a>, <a href="Singapore" title="Singapore">Singapore</a>, and the <a href="People's_Republic_of_China" class="mw-redirect" title="People's Republic of China">People's Republic of China</a>, the convention is to place dots above the outermost numerals of the repetend.</li>
<li><b>Parentheses</b>: In parts of <a href="Europe" title="Europe">Europe</a>, incl. <a href="Austria" title="Austria">Austria</a>, <a href="Denmark" title="Denmark">Denmark</a>, <a href="Finland" title="Finland">Finland</a>, the <a href="Netherlands" title="Netherlands">Netherlands</a>, <a href="Norway" title="Norway">Norway</a>, <a href="Poland" title="Poland">Poland</a>, <a href="Russia" title="Russia">Russia</a> and <a href="Ukraine" title="Ukraine">Ukraine</a>, as well as <a href="Vietnam" title="Vietnam">Vietnam</a> and <a href="Israel" title="Israel">Israel</a>, the convention is to enclose the repetend in parentheses. This can cause confusion with the notation for <a href="Standard_uncertainty" class="mw-redirect" title="Standard uncertainty">standard uncertainty</a>.</li>
<li><b>Arc</b>: In <a href="Spain" title="Spain">Spain</a> and some <a href="Latin_America" title="Latin America">Latin American</a> countries, such as <a href="Argentina" title="Argentina">Argentina</a>, <a href="Brazil" title="Brazil">Brazil</a>, and <a href="Mexico" title="Mexico">Mexico</a>, the arc notation over the repetend is also used as an alternative to the vinculum and the dots notation.</li>
<li><b>Ellipsis</b>: Informally, repeating decimals are often represented by an ellipsis (three periods, 0.333...), especially when the previous notational conventions are first taught in school. This notation introduces uncertainty as to which digits should be repeated and even whether repetition is occurring at all, since such ellipses are also employed for <a href="Irrational_number" title="Irrational number">irrational numbers</a>; <a href="Pi" title="Pi"><span class="texhtml mvar" style="font-style:italic;">π</span></a>, for example, can be represented as 3.14159....</li></ul>
<p>In English, there are various ways to read repeating decimals aloud. For example, 1.2<span style="text-decoration:overline;">34</span> may be read "one point two repeating three four", "one point two repeated three four", "one point two recurring three four", "one point two repetend three four" or "one point two into infinity three four". Likewise, 11.<span style="text-decoration:overline;">1886792452830</span> may be read "eleven point repeating one double eight six seven nine two four five two eight three zero", "eleven point repeated one double eight six seven nine two four five two eight three zero", "eleven point recurring one double eight six seven nine two four five two eight three zero" "eleven point repetend one double eight six seven nine two four five two eight three zero" or "eleven point into infinity one double eight six seven nine two four five two eight three zero".
</p>
<div class="mw-heading mw-heading3"><h3 id="Decimal_expansion_and_recurrence_sequence">Decimal expansion and recurrence sequence</h3></div>
<p>In order to convert a <a href="Rational_number" title="Rational number">rational number</a> represented as a fraction into decimal form, one may use <a href="Long_division" title="Long division">long division</a>. For example, consider the rational number <span class="sfrac">⁠<span class="tion"><span class="num">5</span><span class="sr-only">/</span><span class="den">74</span></span>⁠</span>:
</p>
<pre> <u> 0.0<span style="text-decoration:overline;">675</span></u>
74 ) 5.00000
<u>4.44</u>
560
<u>518</u>
420
<u>370</u>
500
</pre>
<p>etc. Observe that at each step we have a remainder; the successive remainders displayed above are 56, 42, 50. When we arrive at 50 as the remainder, and bring down the "0", we find ourselves dividing 500 by 74, which is the same problem we began with. Therefore, the decimal repeats: <span style="white-space:nowrap">0.0675<span style="margin-left:0.25em">675</span><span style="margin-left:0.25em">675</span></span>....
</p><p>For any integer fraction <span class="sfrac">⁠<span class="tion"><span class="num"><i>A</i></span><span class="sr-only">/</span><span class="den"><i>B</i></span></span>⁠</span>, the remainder at step k, for any positive integer <i>k</i>, is <i>A</i> × 10<sup><i>k</i></sup> (modulo <i>B</i>).
</p>
<div class="mw-heading mw-heading3"><h3 id="Every_rational_number_is_either_a_terminating_or_repeating_decimal">Every rational number is either a terminating or repeating decimal</h3></div>
<p>For any given divisor, only finitely many different remainders can occur. In the example above, the 74 possible remainders are 0,&nbsp;1,&nbsp;2,&nbsp;...,&nbsp;73. If at any point in the division the remainder is 0, the expansion terminates at that point. Then the length of the repetend, also called "period", is defined to be 0.
</p><p>If 0 never occurs as a remainder, then the division process continues forever, and eventually, a remainder must occur that has occurred before. The next step in the division will yield the same new digit in the quotient, and the same new remainder, as the previous time the remainder was the same. Therefore, the following division will repeat the same results. The repeating sequence of digits is called "repetend" which has a certain length greater than 0, also called "period".<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p><p>In base 10, a fraction has a repeating decimal if and only if <a href="In_lowest_terms" class="mw-redirect" title="In lowest terms">in lowest terms</a>, its denominator has at least a prime factor different from 2 and 5 (a prime denominator is considered as a prime factor of itself), or in other words, the denominator cannot be expressed as 2<sup><i>m</i></sup>5<sup><i>n</i></sup>, where <i>m</i> and <i>n</i> are non-negative integers.
</p>
<div class="mw-heading mw-heading3"><h3 id="Every_repeating_or_terminating_decimal_is_a_rational_number">Every repeating or terminating decimal is a rational number</h3></div>
<p>Each repeating decimal number satisfies a <a href="Linear_equation" title="Linear equation">linear equation</a> with integer coefficients, and its unique solution is a rational number. In the example above, <span class="nowrap"><i>α</i> = 5.8144144144...</span> satisfies the equation
</p>
<dl><dd><table>
<tbody><tr>
<td nowrap="">10000<i>α</i> − 10<i>α</i>
</td>
<td nowrap="">= 58144.144144... − 58.144144...
</td></tr>
<tr>
<td align="right">9990<i>α</i></td>
<td>= 58086
</td></tr>
<tr>
<td align="right">Therefore, <i>α</i></td>
<td>= <span class="sfrac">⁠<span class="tion"><span class="num">58086</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">3227</span><span class="sr-only">/</span><span class="den">555</span></span>⁠</span>
</td></tr></tbody></table></dd></dl>
<p>The process of how to find these integer coefficients is described <a href="#Converting_repeating_decimals_to_fractions">below</a>.
</p>
<div class="mw-heading mw-heading4"><h4 id="Formal_proof">Formal proof</h4></div>
<p>Given a repeating decimal <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x=a.b{\overline {c}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<mo>=</mo>
<mi>a</mi>
<mo>.</mo>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mi>c</mi>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x=a.b{\overline {c}}}</annotation>
</semantics>
</math></span><img src="./16a54142b38eef55044f1aa4adc502ee0a13a066.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:8.811ex; height:2.343ex;" alt="{\displaystyle x=a.b{\overline {c}}}" loading="lazy"></span> where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>a</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle a}</annotation>
</semantics>
</math></span><img src="./ffd2487510aa438433a2579450ab2b3d557e5edc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.23ex; height:1.676ex;" alt="{\displaystyle a}" loading="lazy"></span>, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>b</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b}</annotation>
</semantics>
</math></span><img src="./f11423fbb2e967f986e36804a8ae4271734917c3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.998ex; height:2.176ex;" alt="{\displaystyle b}" loading="lazy"></span>, and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c}</annotation>
</semantics>
</math></span><img src="./86a67b81c2de995bd608d5b2df50cd8cd7d92455.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.007ex; height:1.676ex;" alt="{\displaystyle c}" loading="lazy"></span> are groups of digits, let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n=\lceil {\log _{10}b}\rceil }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>n</mi>
<mo>=</mo>
<mo fence="false" stretchy="false">⌈<!-- ⌈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi>log</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>10</mn>
</mrow>
</msub>
<mo>⁡<!-- ⁡ --></mo>
<mi>b</mi>
</mrow>
<mo fence="false" stretchy="false">⌉<!-- ⌉ --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n=\lceil {\log _{10}b}\rceil }</annotation>
</semantics>
</math></span><img src="./dcdf45b77c6dfd8c6759cff84d486cf27849b14e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.791ex; height:2.843ex;" alt="{\displaystyle n=\lceil {\log _{10}b}\rceil }" loading="lazy"></span>, the number of digits of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>b</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b}</annotation>
</semantics>
</math></span><img src="./f11423fbb2e967f986e36804a8ae4271734917c3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.998ex; height:2.176ex;" alt="{\displaystyle b}" loading="lazy"></span>. Multiplying by <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 10^{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 10^{n}}</annotation>
</semantics>
</math></span><img src="./eeff06a7c9ad9455cb809047cfc97a92c51e1bf7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.543ex; height:2.343ex;" alt="{\displaystyle 10^{n}}" loading="lazy"></span> separates the repeating and terminating groups:
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 10^{n}x=ab.{\bar {c}}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mi>x</mi>
<mo>=</mo>
<mi>a</mi>
<mi>b</mi>
<mo>.</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mi>c</mi>
<mo stretchy="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mrow>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 10^{n}x=ab.{\bar {c}}.}</annotation>
</semantics>
</math></span><img src="./c5f7466a59e4142a7edc3df474358a079229996a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:13.171ex; height:2.343ex;" alt="{\displaystyle 10^{n}x=ab.{\bar {c}}.}" loading="lazy"></span>
</p><p>If the decimals terminate (<span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c=0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c=0}</annotation>
</semantics>
</math></span><img src="./d9ee918699d0cb4b8c633cc1f520a8a7a174f44a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.268ex; height:2.176ex;" alt="{\displaystyle c=0}" loading="lazy"></span>), the proof is complete.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> For <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c\neq 0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>≠<!-- ≠ --></mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c\neq 0}</annotation>
</semantics>
</math></span><img src="./be27396bd0e62003728d08329a8767eee94409e2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.268ex; height:2.676ex;" alt="{\displaystyle c\neq 0}" loading="lazy"></span> with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k\in \mathbb {N} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">N</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k\in \mathbb {N} }</annotation>
</semantics>
</math></span><img src="./2a5bc4b7383031ba693b7433198ead7170954c1d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.73ex; height:2.176ex;" alt="{\displaystyle k\in \mathbb {N} }" loading="lazy"></span> digits, let <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x=y.{\bar {c}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<mo>=</mo>
<mi>y</mi>
<mo>.</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mi>c</mi>
<mo stretchy="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x=y.{\bar {c}}}</annotation>
</semantics>
</math></span><img src="./86fd9b77eaca7c16ffccee921995ccbede1a858c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:7.909ex; height:2.343ex;" alt="{\displaystyle x=y.{\bar {c}}}" loading="lazy"></span> where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y\in \mathbb {Z} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>y</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle y\in \mathbb {Z} }</annotation>
</semantics>
</math></span><img src="./a7e6f12a950fae74d6a37b86f7a4bca9174475e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.546ex; height:2.509ex;" alt="{\displaystyle y\in \mathbb {Z} }" loading="lazy"></span> is a terminating group of digits. Then,
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c=d_{1}d_{2}\,...d_{k}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mo>=</mo>
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mspace width="thinmathspace"></mspace>
<mo>.</mo>
<mo>.</mo>
<mo>.</mo>
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c=d_{1}d_{2}\,...d_{k}}</annotation>
</semantics>
</math></span><img src="./f8c2f7f6257c9705568373b86aa139740d56925d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:14.418ex; height:2.509ex;" alt="{\displaystyle c=d_{1}d_{2}\,...d_{k}}" loading="lazy"></span>
</p><p>where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d_{i}}</annotation>
</semantics>
</math></span><img src="./abe3154db7d4f92fb42dd1f80f52f528c6312e4a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.009ex; height:2.509ex;" alt="{\displaystyle d_{i}}" loading="lazy"></span> denotes the <i>i-</i>th <i>digit</i>, and
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x=y+\sum _{n=1}^{\infty }{\frac {c}{{(10^{k})}^{n}}}=y+\left(c\sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}\right)-c.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<mo>=</mo>
<mi>y</mi>
<mo>+</mo>
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">∞<!-- ∞ --></mi>
</mrow>
</munderover>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>c</mi>
<msup>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mo stretchy="false">)</mo>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>=</mo>
<mi>y</mi>
<mo>+</mo>
<mrow>
<mo>(</mo>
<mrow>
<mi>c</mi>
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">∞<!-- ∞ --></mi>
</mrow>
</munderover>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mo stretchy="false">)</mo>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
</mfrac>
</mrow>
</mrow>
<mo>)</mo>
</mrow>
<mo>−<!-- − --></mo>
<mi>c</mi>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x=y+\sum _{n=1}^{\infty }{\frac {c}{{(10^{k})}^{n}}}=y+\left(c\sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}\right)-c.}</annotation>
</semantics>
</math></span><img src="./1500a68107709fde5a6e2e4956debe04b11f3d41.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.171ex; width:47.127ex; height:7.509ex;" alt="{\displaystyle x=y+\sum _{n=1}^{\infty }{\frac {c}{{(10^{k})}^{n}}}=y+\left(c\sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}\right)-c.}" loading="lazy"></span>
</p><p>Since <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \textstyle \sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}={\frac {1}{1-10^{-k}}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mstyle displaystyle="false" scriptlevel="0">
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">∞<!-- ∞ --></mi>
</mrow>
</munderover>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mrow class="MJX-TeXAtom-ORD">
<mo stretchy="false">(</mo>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mo stretchy="false">)</mo>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mrow>
<mn>1</mn>
<mo>−<!-- − --></mo>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mi>k</mi>
</mrow>
</msup>
</mrow>
</mfrac>
</mrow>
</mstyle>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \textstyle \sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}={\frac {1}{1-10^{-k}}}}</annotation>
</semantics>
</math></span><img src="./2c68a029f27a5a9b3f4d516712d861766c9d80e0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.171ex; width:21.32ex; height:4.509ex;" alt="{\displaystyle \textstyle \sum _{n=0}^{\infty }{\frac {1}{{(10^{k})}^{n}}}={\frac {1}{1-10^{-k}}}}" loading="lazy"></span>,<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p><p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x=y-c+{\frac {10^{k}c}{10^{k}-1}}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
<mo>=</mo>
<mi>y</mi>
<mo>−<!-- − --></mo>
<mi>c</mi>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mi>c</mi>
</mrow>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x=y-c+{\frac {10^{k}c}{10^{k}-1}}.}</annotation>
</semantics>
</math></span><img src="./2ae520e5a03c6276f28b18dc2984348d4f31cb69.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:21.171ex; height:6.343ex;" alt="{\displaystyle x=y-c+{\frac {10^{k}c}{10^{k}-1}}.}" loading="lazy"></span>
</p><p>Since <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x}</annotation>
</semantics>
</math></span><img src="./87f9e315fd7e2ba406057a97300593c4802b53e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" loading="lazy"></span> is the sum of an integer (<span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y-c}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>y</mi>
<mo>−<!-- − --></mo>
<mi>c</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle y-c}</annotation>
</semantics>
</math></span><img src="./a31b8fa48b1c33a27478e0118eacc4c418169c7a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.003ex; height:2.343ex;" alt="{\displaystyle y-c}" loading="lazy"></span>) and a rational number (<span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\textstyle {\frac {10^{k}c}{10^{k}-1}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="false" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mi>c</mi>
</mrow>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\textstyle {\frac {10^{k}c}{10^{k}-1}}}</annotation>
</semantics>
</math></span><img src="./768bdcdf2721d71820459b7f5f35c74b4687f538.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:5.44ex; height:4.676ex;" alt="{\textstyle {\frac {10^{k}c}{10^{k}-1}}}" loading="lazy"></span>), <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x}</annotation>
</semantics>
</math></span><img src="./87f9e315fd7e2ba406057a97300593c4802b53e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" loading="lazy"></span> is also rational.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Table_of_values">Table of values</h2></div>
<div><ul>
<li style="display: inline-table;">
<table class="wikitable">
<tbody><tr>
<th class="nowrap ts-vertical-header is-valign-bot" style=""><div style=""><style data-mw-deduplicate="TemplateStyles:r1221560606">
/* start https://en.wikipedia.org/ */


@supports(writing-mode:vertical-rl){.mw-parser-output .ts-vertical-header{line-height:1;max-width:1em;padding:0.4em;vertical-align:bottom;width:1em}html.client-js .mw-parser-output .sortable:not(.jquery-tablesorter) .ts-vertical-header:not(.unsortable),html.client-js .mw-parser-output .ts-vertical-header.headerSort{background-position:50%.4em;padding-right:0.4em;padding-top:21px}.mw-parser-output .ts-vertical-header.is-valign-top{vertical-align:top}.mw-parser-output .ts-vertical-header.is-valign-middle{vertical-align:middle}.mw-parser-output .ts-vertical-header.is-normal{font-weight:normal}.mw-parser-output .ts-vertical-header>*{display:inline-block;transform:rotate(180deg);writing-mode:vertical-rl}@supports(writing-mode:sideways-lr){.mw-parser-output .ts-vertical-header>*{transform:none;writing-mode:sideways-lr}}}


/* end https://en.wikipedia.org/ */
</style><i>fraction</i></div>
</th>
<th>decimal<br>expansion
</th>
<th><style data-mw-deduplicate="TemplateStyles:r886047488">
/* start https://en.wikipedia.org/ */


.mw-parser-output .nobold{font-weight:normal}


/* end https://en.wikipedia.org/ */
</style><span class="nobold"><i>ℓ</i><sub>10</sub></span>
</th>
<th>binary<br>expansion
</th>
<th><span class="nobold"><i>ℓ</i><sub>2</sub></span>
</th></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>⁠</span>
</td>
<td>0.5
</td>
<td>0
</td>
<td>0.1
</td>
<td>0
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">3</span>
</td>
<td>1
</td>
<td>0.<span style="text-decoration:overline;">01</span>
</td>
<td>2
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">4</span></span>⁠</span>
</td>
<td>0.25
</td>
<td>0
</td>
<td>0.01
</td>
<td>0
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">5</span></span>⁠</span>
</td>
<td>0.2
</td>
<td>0
</td>
<td>0.<span style="text-decoration:overline;">0011</span>
</td>
<td>4
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">6</span></span>⁠</span>
</td>
<td>0.1<span style="text-decoration:overline;">6</span>
</td>
<td>1
</td>
<td>0.0<span style="text-decoration:overline;">01</span>
</td>
<td>2
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">142857</span>
</td>
<td>6
</td>
<td>0.<span style="text-decoration:overline;">001</span>
</td>
<td>3
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">8</span></span>⁠</span>
</td>
<td>0.125
</td>
<td>0
</td>
<td>0.001
</td>
<td>0
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">1</span>
</td>
<td>1
</td>
<td>0.<span style="text-decoration:overline;">000111</span>
</td>
<td>6
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span>
</td>
<td>0.1
</td>
<td>0
</td>
<td>0.0<span style="text-decoration:overline;">0011</span>
</td>
<td>4
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">11</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">09</span>
</td>
<td>2
</td>
<td>0.<span style="text-decoration:overline;">0001011101</span>
</td>
<td>10
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">12</span></span>⁠</span>
</td>
<td>0.08<span style="text-decoration:overline;">3</span>
</td>
<td>1
</td>
<td>0.00<span style="text-decoration:overline;">01</span>
</td>
<td>2
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">076923</span>
</td>
<td>6
</td>
<td>0.<span style="text-decoration:overline;">000100111011</span>
</td>
<td>12
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">14</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">714285</span>
</td>
<td>6
</td>
<td>0.0<span style="text-decoration:overline;">001</span>
</td>
<td>3
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">15</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">6</span>
</td>
<td>1
</td>
<td>0.<span style="text-decoration:overline;">0001</span>
</td>
<td>4
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">16</span></span>⁠</span>
</td>
<td>0.0625
</td>
<td>0
</td>
<td>0.0001
</td>
<td>0
</td></tr></tbody></table> </li>
<li style="display: inline-table;">
<table class="wikitable">
<tbody><tr>
<th class="nowrap ts-vertical-header is-valign-bot" style=""><div style=""><i>fraction</i></div>
</th>
<th>decimal<br>expansion
</th>
<th><span class="nobold"><i>ℓ</i><sub>10</sub></span>
</th></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">17</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">0588235294117647</span>
</td>
<td style="text-align:right">16
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">18</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">5</span>
</td>
<td style="text-align:right">1
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">19</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">052631578947368421</span>
</td>
<td style="text-align:right">18
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">20</span></span>⁠</span>
</td>
<td>0.05
</td>
<td style="text-align:right">0
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">21</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">047619</span>
</td>
<td style="text-align:right">6
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">22</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">45</span>
</td>
<td style="text-align:right">2
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">23</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">0434782608695652173913</span>
</td>
<td style="text-align:right">22
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">24</span></span>⁠</span>
</td>
<td>0.041<span style="text-decoration:overline;">6</span>
</td>
<td style="text-align:right">1
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">25</span></span>⁠</span>
</td>
<td>0.04
</td>
<td style="text-align:right">0
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">26</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">384615</span>
</td>
<td style="text-align:right">6
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">27</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">037</span>
</td>
<td style="text-align:right">3
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">28</span></span>⁠</span>
</td>
<td>0.03<span style="text-decoration:overline;">571428</span>
</td>
<td style="text-align:right">6
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">29</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">0344827586206896551724137931</span>
</td>
<td style="text-align:right">28
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">30</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">3</span>
</td>
<td style="text-align:right">1
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">31</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">032258064516129</span>
</td>
<td style="text-align:right">15
</td></tr></tbody></table> </li>
<li style="display: inline-table;">
<table class="wikitable">
<tbody><tr>
<th class="nowrap ts-vertical-header is-valign-bot" style=""><div style=""><i>fraction</i></div>
</th>
<th>decimal<br>expansion
</th>
<th><span class="nobold"><i>ℓ</i><sub>10</sub></span>
</th></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">32</span></span>⁠</span>
</td>
<td>0.03125
</td>
<td style="text-align:right">0
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">33</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">03</span>
</td>
<td style="text-align:right">2
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">34</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">2941176470588235</span>
</td>
<td style="text-align:right">16
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">35</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">285714</span>
</td>
<td style="text-align:right">6
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">36</span></span>⁠</span>
</td>
<td>0.02<span style="text-decoration:overline;">7</span>
</td>
<td style="text-align:right">1
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">37</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">027</span>
</td>
<td style="text-align:right">3
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">38</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">263157894736842105</span>
</td>
<td style="text-align:right">18
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">39</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">025641</span>
</td>
<td style="text-align:right">6
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">40</span></span>⁠</span>
</td>
<td>0.025
</td>
<td style="text-align:right">0
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">41</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">02439</span>
</td>
<td style="text-align:right">5
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">42</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">238095</span>
</td>
<td style="text-align:right">6
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">43</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">023255813953488372093</span>
</td>
<td style="text-align:right">21
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">44</span></span>⁠</span>
</td>
<td>0.02<span style="text-decoration:overline;">27</span>
</td>
<td style="text-align:right">2
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">45</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">2</span>
</td>
<td style="text-align:right">1
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">46</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">2173913043478260869565</span>
</td>
<td style="text-align:right">22
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">47</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">0212765957446808510638297872340425531914893617</span>
</td>
<td style="text-align:right">46
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">48</span></span>⁠</span>
</td>
<td>0.0208<span style="text-decoration:overline;">3</span>
</td>
<td style="text-align:right">1
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">49</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">020408163265306122448979591836734693877551</span>
</td>
<td style="text-align:right">42
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">50</span></span>⁠</span>
</td>
<td>0.02
</td>
<td style="text-align:right">0
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">51</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">0196078431372549</span>
</td>
<td style="text-align:right">16
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">52</span></span>⁠</span>
</td>
<td>0.01<span style="text-decoration:overline;">923076</span>
</td>
<td style="text-align:right">6
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">53</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">0188679245283</span>
</td>
<td style="text-align:right">13
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">54</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">185</span>
</td>
<td style="text-align:right">3
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">55</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">18</span>
</td>
<td style="text-align:right">2
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">56</span></span>⁠</span>
</td>
<td>0.017<span style="text-decoration:overline;">857142</span>
</td>
<td style="text-align:right">6
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">57</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">017543859649122807</span>
</td>
<td style="text-align:right">18
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">58</span></span>⁠</span>
</td>
<td>0.0<span style="text-decoration:overline;">1724137931034482758620689655</span>
</td>
<td style="text-align:right">28
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">59</span></span>⁠</span>
</td>
<td>0.<span style="text-decoration:overline;">0169491525423728813559322033898305084745762711864406779661</span>
</td>
<td style="text-align:right">58
</td></tr>
<tr>
<td style="text-align:center"><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">60</span></span>⁠</span>
</td>
<td>0.01<span style="text-decoration:overline;">6</span>
</td>
<td style="text-align:right">1
</td></tr></tbody></table> </li>
</ul></div>
<p>Thereby <i>fraction</i> is the <a href="Unit_fraction" title="Unit fraction">unit fraction</a> <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span> and <i>ℓ</i><sub>10</sub> is the length of the (decimal) repetend.
</p><p>The lengths <i>ℓ</i><sub>10</sub>(<i>n</i>) of the decimal repetends of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span>, <i>n</i> = 1, 2, 3, ..., are:
</p>
<dl><dd>0, 0, 1, 0, 0, 1, 6, 0, 1, 0, 2, 1, 6, 6, 1, 0, 16, 1, 18, 0, 6, 2, 22, 1, 0, 6, 3, 6, 28, 1, 15, 0, 2, 16, 6, 1, 3, 18, 6, 0, 5, 6, 21, 2, 1, 22, 46, 1, 42, 0, 16, 6, 13, 3, 2, 6, 18, 28, 58, 1, 60, 15, 6, 0, 6, 2, 33, 16, 22, 6, 35, 1, 8, 3, 1, 18, 6, 6, 13, 0, 9, 5, 41, 6, 16, 21, 28, 2, 44, 1, 6, 22, 15, 46, 18, 1, 96, 42, 2, 0... (sequence <span class="nowrap external"><a href="https://oeis.org/A051626" class="extiw external" title="oeis:A051626">A051626</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl>
<p>For comparison, the lengths <i>ℓ</i><sub>2</sub>(<i>n</i>) of the <a href="Binary_number#Representation" title="Binary number">binary</a> repetends of the fractions <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span>, <i>n</i> = 1, 2, 3, ..., are:
</p>
<dl><dd>0, 0, 2, 0, 4, 2, 3, 0, 6, 4, 10, 2, 12, 3, 4, 0, 8, 6, 18, 4, 6, 10, 11, 2, 20, 12, 18, 3, 28, 4, 5, 0, 10, 8, 12, 6, 36, 18, 12, 4, 20, 6, 14, 10, 12, 11, ... (=<a href="https://oeis.org/A007733" class="extiw external" title="oeis:A007733">A007733</a>[<i>n</i>], if <i>n</i> not a power of 2 else =0).</dd></dl>
<p>The decimal repetends of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span>, <i>n</i> = 1, 2, 3, ..., are:
</p>
<dl><dd>0, 0, 3, 0, 0, 6, 142857, 0, 1, 0, 09, 3, 076923, 714285, 6, 0, 0588235294117647, 5, 052631578947368421, 0, 047619, 45, 0434782608695652173913, 6, 0, 384615, 037, 571428, 0344827586206896551724137931, 3, 032258064516129, 0, 03, 2941176470588235, 285714... (sequence <span class="nowrap external"><a href="https://oeis.org/A036275" class="extiw external" title="oeis:A036275">A036275</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl>
<p>The decimal repetend lengths of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>, <i>p</i> = 2, 3, 5, ... (<i>n</i>th prime), are:
</p>
<dl><dd>0, 1, 0, 6, 2, 6, 16, 18, 22, 28, 15, 3, 5, 21, 46, 13, 58, 60, 33, 35, 8, 13, 41, 44, 96, 4, 34, 53, 108, 112, 42, 130, 8, 46, 148, 75, 78, 81, 166, 43, 178, 180, 95, 192, 98, 99, 30, 222, 113, 228, 232, 7, 30, 50, 256, 262, 268, 5, 69, 28, 141, 146, 153, 155, 312, 79... (sequence <span class="nowrap external"><a href="https://oeis.org/A002371" class="extiw external" title="oeis:A002371">A002371</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl>
<p>The least primes <i>p</i> for which <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> has decimal repetend length <i>n</i>, <i>n</i> = 1, 2, 3, ..., are:
</p>
<dl><dd>3, 11, 37, 101, 41, 7, 239, 73, 333667, 9091, 21649, 9901, 53, 909091, 31, 17, 2071723, 19, 1111111111111111111, 3541, 43, 23, 11111111111111111111111, 99990001, 21401, 859, 757, 29, 3191, 211, 2791, 353, 67, 103, 71, 999999000001, 2028119, 909090909090909091, 900900900900990990990991, 1676321, 83, 127, 173... (sequence <span class="nowrap external"><a href="https://oeis.org/A007138" class="extiw external" title="oeis:A007138">A007138</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl>
<p>The least primes <i>p</i> for which <span class="sfrac">⁠<span class="tion"><span class="num"><i>k</i></span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> has <i>n</i> different cycles (<span class="nowrap">1 ≤ <i>k</i> ≤ <i>p</i>−1</span>), <i>n</i> = 1, 2, 3, ..., are:
</p>
<dl><dd>7, 3, 103, 53, 11, 79, 211, 41, 73, 281, 353, 37, 2393, 449, 3061, 1889, 137, 2467, 16189, 641, 3109, 4973, 11087, 1321, 101, 7151, 7669, 757, 38629, 1231, 49663, 12289, 859, 239, 27581, 9613, 18131, 13757, 33931... (sequence <span class="nowrap external"><a href="https://oeis.org/A054471" class="extiw external" title="oeis:A054471">A054471</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl>
<div class="mw-heading mw-heading2"><h2 id="Fractions_with_prime_denominators">Fractions with prime denominators</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Reciprocals_of_primes" title="Reciprocals of primes">Reciprocals of primes</a></div>
<p>A fraction <a href="In_lowest_terms" class="mw-redirect" title="In lowest terms">in lowest terms</a> with a <a href="Prime_number" title="Prime number">prime</a> denominator other than 2 or 5 (i.e. <a href="Coprime" class="mw-redirect" title="Coprime">coprime</a> to 10) always produces a repeating decimal. The length of the repetend (period of the repeating decimal segment) of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> is equal to the <a href="Multiplicative_order" title="Multiplicative order">order</a> of 10 modulo <i>p</i>. If 10 is a <a href="Primitive_root_modulo_n" title="Primitive root modulo n">primitive root</a> modulo <i>p</i>, then the repetend length is equal to <i>p</i>&nbsp;−&nbsp;1; if not, then the repetend length is a factor of <i>p</i>&nbsp;−&nbsp;1. This result can be deduced from <a href="Fermat's_little_theorem" title="Fermat's little theorem">Fermat's little theorem</a>, which states that <span class="nowrap">10<sup><i>p</i>−1</sup> ≡ 1 (mod <i>p</i>)</span>.
</p><p>The base-10 <a href="Digital_root" title="Digital root">digital root</a> of the repetend of the reciprocal of any prime number greater than 5 is 9.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p><p>If the repetend length of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> for prime <i>p</i> is equal to <i>p</i>&nbsp;−&nbsp;1 then the repetend, expressed as an integer, is called a <b>cyclic number</b>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Cyclic_numbers">Cyclic numbers</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Cyclic_number" title="Cyclic number">Cyclic number</a></div>
<p>Examples of fractions belonging to this group are:
</p>
<ul><li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 0.<span style="text-decoration:overline;">142857</span>, 6 repeating digits</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">17</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0588235294117647</span>, 16 repeating digits</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">19</span></span>⁠</span> = 0.<span style="text-decoration:overline;">052631578947368421</span>, 18 repeating digits</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">23</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0434782608695652173913</span>, 22 repeating digits</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">29</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0344827586206896551724137931</span>, 28 repeating digits</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">47</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0212765957446808510638297872340425531914893617</span>, 46 repeating digits</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">59</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0169491525423728813559322033898305084745762711864406779661</span>, 58 repeating digits</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">61</span></span>⁠</span> = 0.<span style="text-decoration:overline;">016393442622950819672131147540983606557377049180327868852459</span>, 60 repeating digits</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">97</span></span>⁠</span> = 0.<span style="text-decoration:overline;">010309278350515463917525773195876288659793814432989690721649484536082474226804123711340206185567</span>, 96 repeating digits</li></ul>
<p>The list can go on to include the fractions <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">109</span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">113</span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">131</span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">149</span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">167</span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">179</span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">181</span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">193</span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">223</span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">229</span></span>⁠</span>, etc. (sequence <span class="nowrap external"><a href="https://oeis.org/A001913" class="extiw external" title="oeis:A001913">A001913</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).
</p><p>Every <i>proper</i> multiple of a cyclic number (that is, a multiple having the same number of digits) is a rotation:
</p>
<ul><li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 1 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">142857</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 2 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">285714</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">3</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 3 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">428571</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 4 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">571428</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">5</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 5 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">714285</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 6 × 0.<span style="text-decoration:overline;">142857</span> = 0.<span style="text-decoration:overline;">857142</span></li></ul>
<p>The reason for the cyclic behavior is apparent from an arithmetic exercise of long division of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span>: the sequential remainders are the cyclic sequence <span class="nowrap">{1, 3, 2, 6, 4, 5}</span>. See also the article <a href="142%2C857" class="mw-redirect" title="142,857">142,857</a> for more properties of this cyclic number.
</p><p>A fraction which is cyclic thus has a recurring decimal of even length that divides into two sequences in <a href="Nines'_complement" class="mw-redirect" title="Nines' complement">nines' complement</a> form. For example <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> starts '142' and is followed by '857' while <span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> (by rotation) starts '857' followed by <i>its</i> nines' complement '142'.
</p><p>The rotation of the repetend of a cyclic number always happens in such a way that each successive repetend is a bigger number than the previous one. In the succession above, for instance, we see that 0.142857... &lt; 0.285714... &lt; 0.428571... &lt; 0.571428... &lt; 0.714285... &lt; 0.857142.... This, for cyclic fractions with long repetends, allows us to easily predict what the result of multiplying the fraction by any natural number n will be, as long as the repetend is known.
</p><p>A <i>proper prime</i> is a prime <i>p</i> which ends in the digit 1 in base 10 and whose reciprocal in base 10 has a repetend with length <i>p</i>&nbsp;−&nbsp;1. In such primes, each digit 0, 1,..., 9 appears in the repeating sequence the same number of times as does each other digit (namely, <span class="sfrac">⁠<span class="tion"><span class="num"><i>p</i>&nbsp;−&nbsp;1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> times). They are:<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: 166">: 166 </span></sup>
</p>
<dl><dd>61, 131, 181, 461, 491, 541, 571, 701, 811, 821, 941, 971, 1021, 1051, 1091, 1171, 1181, 1291, 1301, 1349, 1381, 1531, 1571, 1621, 1741, 1811, 1829, 1861,... (sequence <span class="nowrap external"><a href="https://oeis.org/A073761" class="extiw external" title="oeis:A073761">A073761</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl>
<p>A prime is a proper prime if and only if it is a <a href="Full_reptend_prime" title="Full reptend prime">full reptend prime</a> and <a href="Modular_arithmetic" title="Modular arithmetic">congruent</a> to 1 mod 10.
</p><p>If a prime <i>p</i> is both <a href="Full_reptend_prime" title="Full reptend prime">full reptend prime</a> and <a href="Safe_prime" class="mw-redirect" title="Safe prime">safe prime</a>, then <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> will produce a stream of <i>p</i>&nbsp;−&nbsp;1 <a href="Pseudo-random_numbers" class="mw-redirect" title="Pseudo-random numbers">pseudo-random digits</a>. Those primes are
</p>
<dl><dd>7, 23, 47, 59, 167, 179, 263, 383, 503, 863, 887, 983, 1019, 1367, 1487, 1619, 1823, 2063... (sequence <span class="nowrap external"><a href="https://oeis.org/A000353" class="extiw external" title="oeis:A000353">A000353</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).</dd></dl>
<div class="mw-heading mw-heading3"><h3 id="Other_reciprocals_of_primes">Other reciprocals of primes</h3></div>
<p>Some reciprocals of primes that do not generate cyclic numbers are:
</p>
<ul><li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span> = 0.<span style="text-decoration:overline;">3</span>, which has a period (repetend length) of 1.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">11</span></span>⁠</span> = 0.<span style="text-decoration:overline;">09</span>, which has a period of two.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">076923</span>, which has a period of six.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">31</span></span>⁠</span> = 0.<span style="text-decoration:overline;">032258064516129</span>, which has a period of 15.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">37</span></span>⁠</span> = 0.<span style="text-decoration:overline;">027</span>, which has a period of three.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">41</span></span>⁠</span> = 0.<span style="text-decoration:overline;">02439</span>, which has a period of five.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">43</span></span>⁠</span> = 0.<span style="text-decoration:overline;">023255813953488372093</span>, which has a period of 21.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">53</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0188679245283</span>, which has a period of 13.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">67</span></span>⁠</span> = 0.<span style="text-decoration:overline;">014925373134328358208955223880597</span>, which has a period of 33.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">71</span></span>⁠</span> = 0.<span style="text-decoration:overline;">01408450704225352112676058338028169</span>, which has a period of 35.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">73</span></span>⁠</span> = 0.<span style="text-decoration:overline;">01369863</span>, which has a period of eight.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">79</span></span>⁠</span> = 0.<span style="text-decoration:overline;">0126582278481</span>, which has a period of 13.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">83</span></span>⁠</span> = 0.<span style="text-decoration:overline;">01204819277108433734939759036144578313253</span>, which has a period of 41.</li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">89</span></span>⁠</span> = 0.<span style="text-decoration:overline;">01123595505617977528089887640449438202247191</span>, which has a period of 44.</li></ul>
<p>(sequence <span class="nowrap external"><a href="https://oeis.org/A006559" class="extiw external" title="oeis:A006559">A006559</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>)
</p><p>The reason is that 3 is a divisor of 9, 11 is a divisor of 99, 41 is a divisor of 99999, etc.
To find the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>, we can check whether the prime <i>p</i> divides some number 999...999 in which the number of digits divides <i>p</i>&nbsp;−&nbsp;1. Since the period is never greater than <i>p</i>&nbsp;−&nbsp;1, we can obtain this by calculating <span class="sfrac">⁠<span class="tion"><span class="num">10<sup><i>p</i>−1</sup> − 1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>. For example, for 11 we get
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {10^{11-1}-1}{11}}=909090909}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>11</mn>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mn>11</mn>
</mfrac>
</mrow>
<mo>=</mo>
<mn>909090909</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {10^{11-1}-1}{11}}=909090909}</annotation>
</semantics>
</math></span><img src="./98ba021fc547132937a1fa2b7e586ba6830b9e1d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:24.701ex; height:5.676ex;" alt="{\displaystyle {\frac {10^{11-1}-1}{11}}=909090909}" loading="lazy"></span></dd></dl>
<p>and then by inspection find the repetend 09 and period of 2.
</p><p>Those reciprocals of primes can be associated with several sequences of repeating decimals. For example, the multiples of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> can be divided into two sets, with different repetends. The first set is:
</p>
<ul><li><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">076923</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">10</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">769230</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">9</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">692307</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">12</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">923076</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">3</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">230769</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">307692</span></li></ul>
<p>where the repetend of each fraction is a cyclic re-arrangement of 076923. The second set is:
</p>
<ul><li><span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">153846</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">7</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">538461</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">5</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">384615</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">11</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">846153</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">461538</span></li>
<li><span class="sfrac">⁠<span class="tion"><span class="num">8</span><span class="sr-only">/</span><span class="den">13</span></span>⁠</span> = 0.<span style="text-decoration:overline;">615384</span></li></ul>
<p>where the repetend of each fraction is a cyclic re-arrangement of 153846.
</p><p>In general, the set of proper multiples of reciprocals of a prime <i>p</i> consists of <i>n</i> subsets, each with repetend length&nbsp;<i>k</i>, where <i>nk</i>&nbsp;=&nbsp;<i>p</i>&nbsp;−&nbsp;1.
</p>
<div class="mw-heading mw-heading3"><h3 id="Totient_rule">Totient rule</h3></div>
<p>For an arbitrary integer <i>n</i>, the length <i>L</i>(<i>n</i>) of the decimal repetend of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>n</i></span></span>⁠</span> divides <i>φ</i>(<i>n</i>), where <i>φ</i> is the <a href="Totient_function" class="mw-redirect" title="Totient function">totient function</a>. The length is equal to <span class="nowrap"><i>φ</i>(<i>n</i>)</span> if and only if 10 is a <a href="Primitive_root_modulo_n" title="Primitive root modulo n">primitive root modulo <i>n</i></a>.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p><p>In particular, it follows that <span class="nowrap"><i>L</i>(<i>p</i>) = <i>p</i> − 1</span> <a href="If_and_only_if" title="If and only if">if and only if</a> <i>p</i> is a prime and 10 is a primitive root modulo <i>p</i>. Then, the decimal expansions of <span class="sfrac">⁠<span class="tion"><span class="num"><i>n</i></span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> for <i>n</i> = 1, 2, ..., <i>p</i>&nbsp;−&nbsp;1, all have period <i>p</i>&nbsp;−&nbsp;1 and differ only by a cyclic permutation. Such numbers <i>p</i> are called <a href="Full_repetend_prime" class="mw-redirect" title="Full repetend prime">full repetend primes</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Reciprocals_of_composite_integers_coprime_to_10">Reciprocals of composite integers coprime to 10</h2></div>
<p>If <i>p</i> is a prime other than 2 or 5, the decimal representation of the fraction <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i><sup>2</sup></span></span>⁠</span> repeats:
</p>
<dl><dd><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><b>49</b></span></span>⁠</span> = 0.<span style="text-decoration:overline;">020408163265306122448979591836734693877551</span>.</dd></dl>
<p>The period (repetend length) <i>L</i>(49) must be a factor of <i>λ</i>(49)&nbsp;=&nbsp;42, where <i>λ</i>(<i>n</i>) is known as the <a href="Carmichael_function" title="Carmichael function">Carmichael function</a>. This follows from <a href="Carmichael_function" title="Carmichael function">Carmichael's theorem</a> which states that if <i>n</i> is a positive integer then <i>λ</i>(<i>n</i>) is the smallest integer <i>m</i> such that
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle a^{m}\equiv 1{\pmod {n}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msup>
<mo>≡<!-- ≡ --></mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mspace width="1em"></mspace>
<mo stretchy="false">(</mo>
<mi>mod</mi>
<mspace width="0.333em"></mspace>
<mi>n</mi>
<mo stretchy="false">)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle a^{m}\equiv 1{\pmod {n}}}</annotation>
</semantics>
</math></span><img src="./6295499efc8f39a0cd7ec690788edcb794eb2bde.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.245ex; height:2.843ex;" alt="{\displaystyle a^{m}\equiv 1{\pmod {n}}}" loading="lazy"></span></dd></dl>
<p>for every integer <i>a</i> that is <a href="Coprime" class="mw-redirect" title="Coprime">coprime</a> to <i>n</i>.
</p><p>The period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i><sup>2</sup></span></span>⁠</span> is usually <i>pT</i><sub><i>p</i></sub>, where <i>T</i><sub><i>p</i></sub> is the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>. There are three known primes for which this is not true, and for those the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i><sup>2</sup></span></span>⁠</span> is the same as the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> because <i>p</i><sup>2</sup> divides 10<sup><i>p</i>−1</sup>−1. These three primes are 3, 487, and 56598313 (sequence <span class="nowrap external"><a href="https://oeis.org/A045616" class="extiw external" title="oeis:A045616">A045616</a></span> in the <a href="On-Line_Encyclopedia_of_Integer_Sequences" title="On-Line Encyclopedia of Integer Sequences">OEIS</a>).<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>
</p><p>Similarly, the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i><sup><i>k</i></sup></span></span>⁠</span> is usually <i>p</i><sup><i>k</i>–1</sup><i>T</i><sub><i>p</i></sub>
</p><p>If <i>p</i> and <i>q</i> are primes other than 2 or 5, the decimal representation of the fraction <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>pq</i></span></span>⁠</span> repeats. An example is <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">119</span></span>⁠</span>:
</p>
<dl><dd><b>119</b> = 7 × 17</dd>
<dd><i>λ</i>(7 × 17) = <a href="Least_common_multiple" title="Least common multiple">LCM</a>(<i>λ</i>(7), <i>λ</i>(17)) = LCM(6, 16) = 48,</dd></dl>
<p>where LCM denotes the <a href="Least_common_multiple" title="Least common multiple">least common multiple</a>.
</p><p>The period <i>T</i> of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>pq</i></span></span>⁠</span> is a factor of <i>λ</i>(<i>pq</i>) and it happens to be 48 in this case:
</p>
<dl><dd><span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">119</span></span>⁠</span> = 0.<span style="text-decoration:overline;">008403361344537815126050420168067226890756302521</span>.</dd></dl>
<p>The period <i>T</i> of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>pq</i></span></span>⁠</span> is LCM(<i>T</i><sub><i>p</i></sub>,&nbsp;<i>T</i><sub><i>q</i></sub>), where <i>T</i><sub><i>p</i></sub> is the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> and <i>T</i><sub><i>q</i></sub> is the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>q</i></span></span>⁠</span>.
</p><p>If <i>p</i>, <i>q</i>, <i>r</i>, etc. are primes other than 2 or 5, and <i>k</i>, <i>ℓ</i>, <i>m</i>, etc. are positive integers, then
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {1}{p^{k}q^{\ell }r^{m}\cdots }}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mrow>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<msup>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>ℓ<!-- ℓ --></mi>
</mrow>
</msup>
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msup>
<mo>⋯<!-- ⋯ --></mo>
</mrow>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {1}{p^{k}q^{\ell }r^{m}\cdots }}}</annotation>
</semantics>
</math></span><img src="./8b8547e2bb40bd8bffec2fba6a9f5258738f1515.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:10.926ex; height:5.843ex;" alt="{\displaystyle {\frac {1}{p^{k}q^{\ell }r^{m}\cdots }}}" loading="lazy"></span></dd></dl>
<p>is a repeating decimal with a period of
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {LCM} (T_{p^{k}},T_{q^{\ell }},T_{r^{m}},\ldots )}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>LCM</mi>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<msub>
<mi>T</mi>
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>T</mi>
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>ℓ<!-- ℓ --></mi>
</mrow>
</msup>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>T</mi>
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msup>
</mrow>
</msub>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {LCM} (T_{p^{k}},T_{q^{\ell }},T_{r^{m}},\ldots )}</annotation>
</semantics>
</math></span><img src="./d98204bc07ab0c0696c6fb10ab8eb9e4d79df273.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:22.913ex; height:3.176ex;" alt="{\displaystyle \operatorname {LCM} (T_{p^{k}},T_{q^{\ell }},T_{r^{m}},\ldots )}" loading="lazy"></span></dd></dl>
<p>where <i>T<sub>p<sup>k</sup></sub></i>, <i>T<sub>q<sup>ℓ</sup></sub></i>, <i>T<sub>r<sup>m</sup></sub></i>,... are respectively the period of the repeating decimals <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p<sup>k</sup></i></span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>q<sup>ℓ</sup></i></span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>r<sup>m</sup></i></span></span>⁠</span>,... as defined above.
</p>
<div class="mw-heading mw-heading2"><h2 id="Reciprocals_of_integers_not_coprime_to_10">Reciprocals of integers not coprime to 10</h2></div>
<p>An integer that is not coprime to 10 but has a prime factor other than 2 or 5 has a reciprocal that is eventually periodic, but with a non-repeating sequence of digits that precede the repeating part. The reciprocal can be expressed as:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {1}{2^{a}\cdot 5^{b}p^{k}q^{\ell }\cdots }}\,,}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mrow>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>a</mi>
</mrow>
</msup>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mn>5</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>b</mi>
</mrow>
</msup>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<msup>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>ℓ<!-- ℓ --></mi>
</mrow>
</msup>
<mo>⋯<!-- ⋯ --></mo>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {1}{2^{a}\cdot 5^{b}p^{k}q^{\ell }\cdots }}\,,}</annotation>
</semantics>
</math></span><img src="./aad675249daaa2062aeef4b8bfc605e1eab48c8a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.838ex; width:15.279ex; height:6.176ex;" alt="{\displaystyle {\frac {1}{2^{a}\cdot 5^{b}p^{k}q^{\ell }\cdots }}\,,}" loading="lazy"></span></dd></dl>
<p>where <i>a</i> and <i>b</i> are not both zero.
</p><p>This fraction can also be expressed as:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {5^{a-b}}{10^{a}p^{k}q^{\ell }\cdots }}\,,}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<msup>
<mn>5</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>a</mi>
<mo>−<!-- − --></mo>
<mi>b</mi>
</mrow>
</msup>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>a</mi>
</mrow>
</msup>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<msup>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>ℓ<!-- ℓ --></mi>
</mrow>
</msup>
<mo>⋯<!-- ⋯ --></mo>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {5^{a-b}}{10^{a}p^{k}q^{\ell }\cdots }}\,,}</annotation>
</semantics>
</math></span><img src="./f16feb9226afa4118238e99118b7f17f43a4e156.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:12.663ex; height:6.343ex;" alt="{\displaystyle {\frac {5^{a-b}}{10^{a}p^{k}q^{\ell }\cdots }}\,,}" loading="lazy"></span></dd></dl>
<p>if <i>a</i> &gt; <i>b</i>, or as
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {2^{b-a}}{10^{b}p^{k}q^{\ell }\cdots }}\,,}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>b</mi>
<mo>−<!-- − --></mo>
<mi>a</mi>
</mrow>
</msup>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>b</mi>
</mrow>
</msup>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<msup>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>ℓ<!-- ℓ --></mi>
</mrow>
</msup>
<mo>⋯<!-- ⋯ --></mo>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {2^{b-a}}{10^{b}p^{k}q^{\ell }\cdots }}\,,}</annotation>
</semantics>
</math></span><img src="./ffb274c50fb84c523ccfbf1a569e4b2da16fcd8c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.838ex; width:12.498ex; height:6.676ex;" alt="{\displaystyle {\frac {2^{b-a}}{10^{b}p^{k}q^{\ell }\cdots }}\,,}" loading="lazy"></span></dd></dl>
<p>if <i>b</i> &gt; <i>a</i>, or as
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {1}{10^{a}p^{k}q^{\ell }\cdots }}\,,}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>a</mi>
</mrow>
</msup>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msup>
<msup>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>ℓ<!-- ℓ --></mi>
</mrow>
</msup>
<mo>⋯<!-- ⋯ --></mo>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {1}{10^{a}p^{k}q^{\ell }\cdots }}\,,}</annotation>
</semantics>
</math></span><img src="./6e8d4176cddb1b5271eb8be70f959a83df967793.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:12.663ex; height:5.843ex;" alt="{\displaystyle {\frac {1}{10^{a}p^{k}q^{\ell }\cdots }}\,,}" loading="lazy"></span></dd></dl>
<p>if <i>a</i> = <i>b</i>.
</p><p>The decimal has:
</p>
<ul><li>An initial transient of max(<i>a</i>,&nbsp;<i>b</i>) digits after the decimal point. Some or all of the digits in the transient can be zeros.</li>
<li>A subsequent repetend which is the same as that for the fraction <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p<sup>k</sup></i> <i>q<sup>ℓ</sup></i> ⋯</span></span>⁠</span>.</li></ul>
<p>For example <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">28</span></span>⁠</span> = 0.03<span style="text-decoration:overline;">571428</span>:
</p>
<ul><li><i>a</i> = 2, <i>b</i> = 0, and the other factors <span class="nowrap"><i>p<sup>k</sup></i> <i>q<sup>ℓ</sup></i> ⋯ = 7</span></li>
<li>there are 2 initial non-repeating digits, 03; and</li>
<li>there are 6 repeating digits, 571428, the same amount as <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> has.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Converting_repeating_decimals_to_fractions">Converting repeating decimals to fractions</h2></div>
<p>Given a repeating decimal, it is possible to calculate the fraction that produces it. For example:
</p>
<dl><dd><table>

<tbody><tr>
<td style="text-align:right;width:3em"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x}</annotation>
</semantics>
</math></span><img src="./87f9e315fd7e2ba406057a97300593c4802b53e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" loading="lazy"></span></td>
<td style="width:12em"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle =0.333333\ldots }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mn>0.333333</mn>
<mo>…<!-- … --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle =0.333333\ldots }</annotation>
</semantics>
</math></span><img src="./bbdd989bed8804e4f3fc1df7afd8ac1ec25c5ac4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:14.348ex; height:2.176ex;" alt="{\displaystyle =0.333333\ldots }" loading="lazy"></span>
</td></tr>
<tr>
<td style="text-align:right"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 10x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>10</mn>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 10x}</annotation>
</semantics>
</math></span><img src="./b5d55a1c1904762c24cf43f5000da77696052001.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.655ex; height:2.176ex;" alt="{\displaystyle 10x}" loading="lazy"></span></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle =3.333333\ldots }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mn>3.333333</mn>
<mo>…<!-- … --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle =3.333333\ldots }</annotation>
</semantics>
</math></span><img src="./f399f536ec7a478ddb0a5fe75d0de4d4eba6b504.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:14.348ex; height:2.176ex;" alt="{\displaystyle =3.333333\ldots }" loading="lazy"></span></td>
<td>(multiply each side of the above line by 10)
</td></tr>
<tr>
<td style="text-align:right"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 9x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>9</mn>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 9x}</annotation>
</semantics>
</math></span><img src="./a157790e3ea2ba51d6ae2143969bbdab80f68d1b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.492ex; height:2.176ex;" alt="{\displaystyle 9x}" loading="lazy"></span></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle =3}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mn>3</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle =3}</annotation>
</semantics>
</math></span><img src="./e40a8447b4be595459a57d399a1e490c08c1113e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.616ex; height:2.176ex;" alt="{\displaystyle =3}" loading="lazy"></span></td>
<td>(subtract the 1st line from the 2nd)
</td></tr>
<tr>
<td style="text-align:right"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x}</annotation>
</semantics>
</math></span><img src="./87f9e315fd7e2ba406057a97300593c4802b53e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" loading="lazy"></span></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ={\frac {3}{9}}={\frac {1}{3}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>3</mn>
<mn>9</mn>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>3</mn>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ={\frac {3}{9}}={\frac {1}{3}}}</annotation>
</semantics>
</math></span><img src="./5f166bb95037311c490966543d221dca7ab0a0cb.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:9.549ex; height:5.176ex;" alt="{\displaystyle ={\frac {3}{9}}={\frac {1}{3}}}" loading="lazy"></span></td>
<td>(reduce to lowest terms)
</td></tr></tbody></table></dd></dl>
<p>Another example:
</p>
<dl><dd><table>

<tbody><tr>
<td style="text-align:right;width:3em"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x}</annotation>
</semantics>
</math></span><img src="./87f9e315fd7e2ba406057a97300593c4802b53e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" loading="lazy"></span></td>
<td style="width:12em"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle =\ \ \ \ 0.836363636\ldots }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mtext>&nbsp;</mtext>
<mtext>&nbsp;</mtext>
<mtext>&nbsp;</mtext>
<mtext>&nbsp;</mtext>
<mn>0.836363636</mn>
<mo>…<!-- … --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle =\ \ \ \ 0.836363636\ldots }</annotation>
</semantics>
</math></span><img src="./39be152f9af3cdb84932f53ba6d91baa0424d1fa.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:20.158ex; height:2.176ex;" alt="{\displaystyle =\ \ \ \ 0.836363636\ldots }" loading="lazy"></span>
</td></tr>
<tr>
<td style="text-align:right"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 10x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>10</mn>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 10x}</annotation>
</semantics>
</math></span><img src="./b5d55a1c1904762c24cf43f5000da77696052001.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:3.655ex; height:2.176ex;" alt="{\displaystyle 10x}" loading="lazy"></span></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle =\ \ \ \ 8.36363636\ldots }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mtext>&nbsp;</mtext>
<mtext>&nbsp;</mtext>
<mtext>&nbsp;</mtext>
<mtext>&nbsp;</mtext>
<mn>8.36363636</mn>
<mo>…<!-- … --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle =\ \ \ \ 8.36363636\ldots }</annotation>
</semantics>
</math></span><img src="./e29784217f7e5fb5b5ef0f1c05fac012c96b4928.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:18.995ex; height:2.176ex;" alt="{\displaystyle =\ \ \ \ 8.36363636\ldots }" loading="lazy"></span></td>
<td>(move decimal to start of repetition = move by 1 place = multiply by 10)
</td></tr>
<tr>
<td style="text-align:right"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 1000x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>1000</mn>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 1000x}</annotation>
</semantics>
</math></span><img src="./3e86ef591fc77aecd41122f45f3752137ba31631.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.98ex; height:2.176ex;" alt="{\displaystyle 1000x}" loading="lazy"></span></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle =836.36363636\ldots }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mn>836.36363636</mn>
<mo>…<!-- … --></mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle =836.36363636\ldots }</annotation>
</semantics>
</math></span><img src="./ad5676af02ed9aa90c2a526acd3b1625a87c1306.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:18.997ex; height:2.176ex;" alt="{\displaystyle =836.36363636\ldots }" loading="lazy"></span></td>
<td>(collate 2nd repetition here with 1st above = move by 2 places = multiply by 100)
</td></tr>
<tr>
<td style="text-align:right"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 990x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>990</mn>
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 990x}</annotation>
</semantics>
</math></span><img src="./f255a0f25922edbc825f8076f484764f879ea17c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.817ex; height:2.176ex;" alt="{\displaystyle 990x}" loading="lazy"></span></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle =828}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mn>828</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle =828}</annotation>
</semantics>
</math></span><img src="./550332868c429a966447487043afa51a5b645614.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.941ex; height:2.176ex;" alt="{\displaystyle =828}" loading="lazy"></span></td>
<td>(subtract to clear decimals)
</td></tr>
<tr>
<td style="text-align:right"><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>x</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle x}</annotation>
</semantics>
</math></span><img src="./87f9e315fd7e2ba406057a97300593c4802b53e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}" loading="lazy"></span></td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ={\frac {828}{990}}={\frac {18\cdot 46}{18\cdot 55}}={\frac {46}{55}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>828</mn>
<mn>990</mn>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>18</mn>
<mo>⋅<!-- ⋅ --></mo>
<mn>46</mn>
</mrow>
<mrow>
<mn>18</mn>
<mo>⋅<!-- ⋅ --></mo>
<mn>55</mn>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>46</mn>
<mn>55</mn>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ={\frac {828}{990}}={\frac {18\cdot 46}{18\cdot 55}}={\frac {46}{55}}}</annotation>
</semantics>
</math></span><img src="./9e4eabe6884faafa39c1fa41c340b1ece5f8d6d9.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:23.3ex; height:5.176ex;" alt="{\displaystyle ={\frac {828}{990}}={\frac {18\cdot 46}{18\cdot 55}}={\frac {46}{55}}}" loading="lazy"></span></td>
<td>(reduce to lowest terms)
</td></tr></tbody></table></dd></dl>
<div class="mw-heading mw-heading3"><h3 id="A_shortcut">A shortcut</h3></div>
<p>The procedure below can be applied in particular if the repetend has <i>n</i> digits, all of which are 0 except the final one which is 1. For instance for <i>n</i>&nbsp;=&nbsp;7:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}x&amp;=0.000000100000010000001\ldots \\10^{7}x&amp;=1.000000100000010000001\ldots \\\left(10^{7}-1\right)x=9999999x&amp;=1\\x&amp;={\frac {1}{10^{7}-1}}={\frac {1}{9999999}}\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mi>x</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mn>0.000000100000010000001</mn>
<mo>…<!-- … --></mo>
</mtd>
</mtr>
<mtr>
<mtd>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>7</mn>
</mrow>
</msup>
<mi>x</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mn>1.000000100000010000001</mn>
<mo>…<!-- … --></mo>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mo>(</mo>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>7</mn>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mo>)</mo>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mn>9999999</mn>
<mi>x</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mn>1</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>x</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>7</mn>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>9999999</mn>
</mfrac>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}x&amp;=0.000000100000010000001\ldots \\10^{7}x&amp;=1.000000100000010000001\ldots \\\left(10^{7}-1\right)x=9999999x&amp;=1\\x&amp;={\frac {1}{10^{7}-1}}={\frac {1}{9999999}}\end{aligned}}}</annotation>
</semantics>
</math></span><img src="./25ef6b650d7e3461209779df0ecaf648d05515e1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -7.029ex; margin-bottom: -0.309ex; width:56.975ex; height:15.843ex;" alt="{\displaystyle {\begin{aligned}x&amp;=0.000000100000010000001\ldots \\10^{7}x&amp;=1.000000100000010000001\ldots \\\left(10^{7}-1\right)x=9999999x&amp;=1\\x&amp;={\frac {1}{10^{7}-1}}={\frac {1}{9999999}}\end{aligned}}}" loading="lazy"></span></dd></dl>
<p>So this particular repeating decimal corresponds to the fraction <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">10<sup><i>n</i></sup>&nbsp;−&nbsp;1</span></span>⁠</span>, where the denominator is the number written as <i>n</i> 9s. Knowing just that, a general repeating decimal can be expressed as a fraction without having to solve an equation. For example, one could reason:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}7.48181818\ldots &amp;=7.3+0.18181818\ldots \\[8pt]&amp;={\frac {73}{10}}+{\frac {18}{99}}={\frac {73}{10}}+{\frac {9\cdot 2}{9\cdot 11}}={\frac {73}{10}}+{\frac {2}{11}}\\[12pt]&amp;={\frac {11\cdot 73+10\cdot 2}{10\cdot 11}}={\frac {823}{110}}\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="1.1em 1.5em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mn>7.48181818</mn>
<mo>…<!-- … --></mo>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mn>7.3</mn>
<mo>+</mo>
<mn>0.18181818</mn>
<mo>…<!-- … --></mo>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>73</mn>
<mn>10</mn>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>18</mn>
<mn>99</mn>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>73</mn>
<mn>10</mn>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>9</mn>
<mo>⋅<!-- ⋅ --></mo>
<mn>2</mn>
</mrow>
<mrow>
<mn>9</mn>
<mo>⋅<!-- ⋅ --></mo>
<mn>11</mn>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>73</mn>
<mn>10</mn>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>2</mn>
<mn>11</mn>
</mfrac>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>11</mn>
<mo>⋅<!-- ⋅ --></mo>
<mn>73</mn>
<mo>+</mo>
<mn>10</mn>
<mo>⋅<!-- ⋅ --></mo>
<mn>2</mn>
</mrow>
<mrow>
<mn>10</mn>
<mo>⋅<!-- ⋅ --></mo>
<mn>11</mn>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>823</mn>
<mn>110</mn>
</mfrac>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}7.48181818\ldots &amp;=7.3+0.18181818\ldots \\[8pt]&amp;={\frac {73}{10}}+{\frac {18}{99}}={\frac {73}{10}}+{\frac {9\cdot 2}{9\cdot 11}}={\frac {73}{10}}+{\frac {2}{11}}\\[12pt]&amp;={\frac {11\cdot 73+10\cdot 2}{10\cdot 11}}={\frac {823}{110}}\end{aligned}}}</annotation>
</semantics>
</math></span><img src="./e6cf612540b8255ca0ae162cc6f8ccad16a2ed93.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -8.671ex; width:54.595ex; height:18.509ex;" alt="{\displaystyle {\begin{aligned}7.48181818\ldots &amp;=7.3+0.18181818\ldots \\[8pt]&amp;={\frac {73}{10}}+{\frac {18}{99}}={\frac {73}{10}}+{\frac {9\cdot 2}{9\cdot 11}}={\frac {73}{10}}+{\frac {2}{11}}\\[12pt]&amp;={\frac {11\cdot 73+10\cdot 2}{10\cdot 11}}={\frac {823}{110}}\end{aligned}}}" loading="lazy"></span></dd></dl>
<p>or
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}11.18867924528301886792452830\ldots &amp;=11+0.18867924528301886792452830\ldots \\[8pt]&amp;=11+{\frac {10}{53}}={\frac {11\cdot 53+10}{53}}={\frac {593}{53}}\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="1.1em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mn>11.18867924528301886792452830</mn>
<mo>…<!-- … --></mo>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mn>11</mn>
<mo>+</mo>
<mn>0.18867924528301886792452830</mn>
<mo>…<!-- … --></mo>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mn>11</mn>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>10</mn>
<mn>53</mn>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mn>11</mn>
<mo>⋅<!-- ⋅ --></mo>
<mn>53</mn>
<mo>+</mo>
<mn>10</mn>
</mrow>
<mn>53</mn>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>593</mn>
<mn>53</mn>
</mfrac>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}11.18867924528301886792452830\ldots &amp;=11+0.18867924528301886792452830\ldots \\[8pt]&amp;=11+{\frac {10}{53}}={\frac {11\cdot 53+10}{53}}={\frac {593}{53}}\end{aligned}}}</annotation>
</semantics>
</math></span><img src="./9ebeebd569c5d473703b099d8068247a0def48d7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.505ex; width:80.465ex; height:10.176ex;" alt="{\displaystyle {\begin{aligned}11.18867924528301886792452830\ldots &amp;=11+0.18867924528301886792452830\ldots \\[8pt]&amp;=11+{\frac {10}{53}}={\frac {11\cdot 53+10}{53}}={\frac {593}{53}}\end{aligned}}}" loading="lazy"></span></dd></dl>
<p>It is possible to get a general formula expressing a repeating decimal with an <i>n</i>-digit period (repetend length), beginning right after the decimal point, as a fraction:
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}x&amp;=0.{\overline {a_{1}a_{2}\cdots a_{n}}}\\10^{n}x&amp;=a_{1}a_{2}\cdots a_{n}.{\overline {a_{1}a_{2}\cdots a_{n}}}\\[5pt]\left(10^{n}-1\right)x=99\cdots 99x&amp;=a_{1}a_{2}\cdots a_{n}\\[5pt]x&amp;={\frac {a_{1}a_{2}\cdots a_{n}}{10^{n}-1}}={\frac {a_{1}a_{2}\cdots a_{n}}{99\cdots 99}}\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt 0.8em 0.8em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mi>x</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mn>0.</mn>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mrow>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>⋯<!-- ⋯ --></mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mrow>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mi>x</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>⋯<!-- ⋯ --></mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>.</mo>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mrow>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>⋯<!-- ⋯ --></mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mrow>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mo>(</mo>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mo>)</mo>
</mrow>
<mi>x</mi>
<mo>=</mo>
<mn>99</mn>
<mo>⋯<!-- ⋯ --></mo>
<mn>99</mn>
<mi>x</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>⋯<!-- ⋯ --></mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>x</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>⋯<!-- ⋯ --></mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mrow>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>⋯<!-- ⋯ --></mo>
<msub>
<mi>a</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
</mrow>
<mrow>
<mn>99</mn>
<mo>⋯<!-- ⋯ --></mo>
<mn>99</mn>
</mrow>
</mfrac>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}x&amp;=0.{\overline {a_{1}a_{2}\cdots a_{n}}}\\10^{n}x&amp;=a_{1}a_{2}\cdots a_{n}.{\overline {a_{1}a_{2}\cdots a_{n}}}\\[5pt]\left(10^{n}-1\right)x=99\cdots 99x&amp;=a_{1}a_{2}\cdots a_{n}\\[5pt]x&amp;={\frac {a_{1}a_{2}\cdots a_{n}}{10^{n}-1}}={\frac {a_{1}a_{2}\cdots a_{n}}{99\cdots 99}}\end{aligned}}}</annotation>
</semantics>
</math></span><img src="./d2515e466c7582dd33e653060a6efdebcff65665.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -7.671ex; width:53.296ex; height:16.509ex;" alt="{\displaystyle {\begin{aligned}x&amp;=0.{\overline {a_{1}a_{2}\cdots a_{n}}}\\10^{n}x&amp;=a_{1}a_{2}\cdots a_{n}.{\overline {a_{1}a_{2}\cdots a_{n}}}\\[5pt]\left(10^{n}-1\right)x=99\cdots 99x&amp;=a_{1}a_{2}\cdots a_{n}\\[5pt]x&amp;={\frac {a_{1}a_{2}\cdots a_{n}}{10^{n}-1}}={\frac {a_{1}a_{2}\cdots a_{n}}{99\cdots 99}}\end{aligned}}}" loading="lazy"></span></dd></dl>
<p>More explicitly, one gets the following cases:
</p><p>If the repeating decimal is between 0 and 1, and the repeating block is <i>n</i> digits long, first occurring right after the decimal point, then the fraction (not necessarily reduced) will be the integer number represented by the <i>n</i>-digit block divided by the one represented by <i>n</i> 9s. For example,
</p>
<ul><li>0.444444... = <span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span> since the repeating block is 4 (a 1-digit block),</li>
<li>0.565656... = <span class="sfrac">⁠<span class="tion"><span class="num">56</span><span class="sr-only">/</span><span class="den">99</span></span>⁠</span> since the repeating block is 56 (a 2-digit block),</li>
<li>0.012012... = <span class="sfrac">⁠<span class="tion"><span class="num">12</span><span class="sr-only">/</span><span class="den">999</span></span>⁠</span> since the repeating block is 012 (a 3-digit block); this further reduces to <span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">333</span></span>⁠</span>.</li>
<li>0.999999... = <span class="sfrac">⁠<span class="tion"><span class="num">9</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span> = 1, since the repeating block is 9 (also a 1-digit block)</li></ul>
<p>If the repeating decimal is as above, except that there are <i>k</i> (extra) digits 0 between the decimal point and the repeating <i>n</i>-digit block, then one can simply add <i>k</i> digits 0 after the <i>n</i> digits 9 of the denominator (and, as before, the fraction may subsequently be simplified). For example,
</p>
<ul><li>0.000444... = <span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">9000</span></span>⁠</span> since the repeating block is 4 and this block is preceded by 3 zeros,</li>
<li>0.005656... = <span class="sfrac">⁠<span class="tion"><span class="num">56</span><span class="sr-only">/</span><span class="den">9900</span></span>⁠</span> since the repeating block is 56 and it is preceded by 2 zeros,</li>
<li>0.00012012... = <span class="sfrac">⁠<span class="tion"><span class="num">12</span><span class="sr-only">/</span><span class="den">99900</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">8325</span></span>⁠</span> since the repeating block is 012 and it is preceded by 2 zeros.</li></ul>
<p>Any repeating decimal not of the form described above can be written as a sum of a terminating decimal and a repeating decimal of one of the two above types (actually the first type suffices, but that could require the terminating decimal to be negative). For example,
</p>
<ul><li>1.23444... = 1.23 + 0.00444... = <span class="sfrac">⁠<span class="tion"><span class="num">123</span><span class="sr-only">/</span><span class="den">100</span></span>⁠</span> + <span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">1107</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> + <span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">1111</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span>
<ul><li>or alternatively 1.23444... = 0.79 + 0.44444... = <span class="sfrac">⁠<span class="tion"><span class="num">79</span><span class="sr-only">/</span><span class="den">100</span></span>⁠</span> + <span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">9</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">711</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> + <span class="sfrac">⁠<span class="tion"><span class="num">400</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">1111</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span></li></ul></li>
<li>0.3789789... = 0.3 + 0.0789789... = <span class="sfrac">⁠<span class="tion"><span class="num">3</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> + <span class="sfrac">⁠<span class="tion"><span class="num">789</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">2997</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> + <span class="sfrac">⁠<span class="tion"><span class="num">789</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">3786</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">631</span><span class="sr-only">/</span><span class="den">1665</span></span>⁠</span>
<ul><li>or alternatively 0.3789789... = −0.6 + 0.9789789... = −<span class="sfrac">⁠<span class="tion"><span class="num">6</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> + 978/999 = −<span class="sfrac">⁠<span class="tion"><span class="num">5994</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> + <span class="sfrac">⁠<span class="tion"><span class="num">9780</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">3786</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">631</span><span class="sr-only">/</span><span class="den">1665</span></span>⁠</span></li></ul></li></ul>
<p>An even faster method is to ignore the decimal point completely and go like this
</p>
<ul><li>1.23444... = <span class="sfrac">⁠<span class="tion"><span class="num">1234 − 123</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">1111</span><span class="sr-only">/</span><span class="den">900</span></span>⁠</span> (denominator has one 9 and two 0s because one digit repeats and there are two non-repeating digits after the decimal point)</li>
<li>0.3789789... = <span class="sfrac">⁠<span class="tion"><span class="num">3789 − 3</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> = <span class="sfrac">⁠<span class="tion"><span class="num">3786</span><span class="sr-only">/</span><span class="den">9990</span></span>⁠</span> (denominator has three 9s and one 0 because three digits repeat and there is one non-repeating digit after the decimal point)</li></ul>
<p>It follows that any repeating decimal with <a href="Periodic_function" title="Periodic function">period</a> <i>n</i>, and <i>k</i> digits after the decimal point that do not belong to the repeating part, can be written as a (not necessarily reduced) fraction whose denominator is (10<sup><i>n</i></sup>&nbsp;−&nbsp;1)10<sup><i>k</i></sup>.
</p><p>Conversely the period of the repeating decimal of a fraction <span class="sfrac">⁠<span class="tion"><span class="num"><i>c</i></span><span class="sr-only">/</span><span class="den"><i>d</i></span></span>⁠</span> will be (at most) the smallest number <i>n</i> such that 10<sup><i>n</i></sup>&nbsp;−&nbsp;1 is divisible by <i>d</i>.
</p><p>For example, the fraction <span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> has <i>d</i> = 7, and the smallest <i>k</i> that makes 10<sup><i>k</i></sup>&nbsp;−&nbsp;1 divisible by 7 is <i>k</i> = 6, because 999999 = 7&nbsp;×&nbsp;142857. The period of the fraction <span class="sfrac">⁠<span class="tion"><span class="num">2</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> is therefore 6.
</p>
<div class="mw-heading mw-heading4"><h4 id="In_compressed_form">In compressed form</h4></div>
<p>The following picture suggests kind of compression of the above shortcut.
Thereby <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {I} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">I</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbf {I} }</annotation>
</semantics>
</math></span><img src="./8a458c8aeb096ce732abf346ae8edf3e4f53a126.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.014ex; height:2.176ex;" alt="{\displaystyle \mathbf {I} }" loading="lazy"></span> represents the digits of the integer part of the decimal number (to the left of the decimal point), <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {A} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbf {A} }</annotation>
</semantics>
</math></span><img src="./0795cc96c75d81520a120482662b90f024c9a1a1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.019ex; height:2.176ex;" alt="{\displaystyle \mathbf {A} }" loading="lazy"></span> makes up the string of digits of the preperiod and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \#\mathbf {A} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \#\mathbf {A} }</annotation>
</semantics>
</math></span><img src="./01f7b946ece1fc1bcb869894ba3796b7cd87ddfa.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.955ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {A} }" loading="lazy"></span> its length, and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {P} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbf {P} }</annotation>
</semantics>
</math></span><img src="./c0c250ef2a112c86b93c637dfa288c6d7f34ac3f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.827ex; height:2.176ex;" alt="{\displaystyle \mathbf {P} }" loading="lazy"></span> being the string of repeated digits (the period) with length <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \#\mathbf {P} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \#\mathbf {P} }</annotation>
</semantics>
</math></span><img src="./768e06b55805eb98f69be9deefaccba44fe8cc84.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.763ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {P} }" loading="lazy"></span> which is nonzero.
</p>

<p>In the generated fraction, the digit <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 9}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>9</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 9}</annotation>
</semantics>
</math></span><img src="./32d3d1e1f9dfe0254c628379e69a69711fe4eabd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 9}" loading="lazy"></span> will be repeated <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \#\mathbf {P} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \#\mathbf {P} }</annotation>
</semantics>
</math></span><img src="./768e06b55805eb98f69be9deefaccba44fe8cc84.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.763ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {P} }" loading="lazy"></span> times, and the digit <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0}</annotation>
</semantics>
</math></span><img src="./2aae8864a3c1fec9585261791a809ddec1489950.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.162ex; height:2.176ex;" alt="{\displaystyle 0}" loading="lazy"></span> will be repeated <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \#\mathbf {A} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \#\mathbf {A} }</annotation>
</semantics>
</math></span><img src="./01f7b946ece1fc1bcb869894ba3796b7cd87ddfa.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.955ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {A} }" loading="lazy"></span> times.
</p><p>Note that in the absence of an <i><b>integer</b></i> part in the decimal, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {I} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">I</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbf {I} }</annotation>
</semantics>
</math></span><img src="./8a458c8aeb096ce732abf346ae8edf3e4f53a126.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.014ex; height:2.176ex;" alt="{\displaystyle \mathbf {I} }" loading="lazy"></span> will be represented by zero, which being to the left of the other digits, will not affect the final result, and may be omitted in the calculation of the generating function.
</p><p>Examples:
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{array}{lllll}3.254444\ldots &amp;=3.25{\overline {4}}&amp;={\begin{Bmatrix}\mathbf {I} =3&amp;\mathbf {A} =25&amp;\mathbf {P} =4\\&amp;\#\mathbf {A} =2&amp;\#\mathbf {P} =1\end{Bmatrix}}&amp;={\dfrac {3254-325}{900}}&amp;={\dfrac {2929}{900}}\\\\0.512512\ldots &amp;=0.{\overline {512}}&amp;={\begin{Bmatrix}\mathbf {I} =0&amp;\mathbf {A} =\emptyset &amp;\mathbf {P} =512\\&amp;\#\mathbf {A} =0&amp;\#\mathbf {P} =3\end{Bmatrix}}&amp;={\dfrac {512-0}{999}}&amp;={\dfrac {512}{999}}\\\\1.09191\ldots &amp;=1.0{\overline {91}}&amp;={\begin{Bmatrix}\mathbf {I} =1&amp;\mathbf {A} =0&amp;\mathbf {P} =91\\&amp;\#\mathbf {A} =1&amp;\#\mathbf {P} =2\end{Bmatrix}}&amp;={\dfrac {1091-10}{990}}&amp;={\dfrac {1081}{990}}\\\\1.333\ldots &amp;=1.{\overline {3}}&amp;={\begin{Bmatrix}\mathbf {I} =1&amp;\mathbf {A} =\emptyset &amp;\mathbf {P} =3\\&amp;\#\mathbf {A} =0&amp;\#\mathbf {P} =1\end{Bmatrix}}&amp;={\dfrac {13-1}{9}}&amp;={\dfrac {12}{9}}&amp;={\dfrac {4}{3}}\\\\0.3789789\ldots &amp;=0.3{\overline {789}}&amp;={\begin{Bmatrix}\mathbf {I} =0&amp;\mathbf {A} =3&amp;\mathbf {P} =789\\&amp;\#\mathbf {A} =1&amp;\#\mathbf {P} =3\end{Bmatrix}}&amp;={\dfrac {3789-3}{9990}}&amp;={\dfrac {3786}{9990}}&amp;={\dfrac {631}{1665}}\end{array}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="left left left left left" rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mn>3.254444</mn>
<mo>…<!-- … --></mo>
</mtd>
<mtd>
<mo>=</mo>
<mn>3.25</mn>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mn>4</mn>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">I</mi>
</mrow>
<mo>=</mo>
<mn>3</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mn>25</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>4</mn>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mn>2</mn>
</mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
<mo>}</mo>
</mrow>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mrow>
<mn>3254</mn>
<mo>−<!-- − --></mo>
<mn>325</mn>
</mrow>
<mn>900</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mn>2929</mn>
<mn>900</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
</mtr>
<mtr>
<mtd>
<mn>0.512512</mn>
<mo>…<!-- … --></mo>
</mtd>
<mtd>
<mo>=</mo>
<mn>0.</mn>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mn>512</mn>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">I</mi>
</mrow>
<mo>=</mo>
<mn>0</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mi mathvariant="normal">∅<!-- ∅ --></mi>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>512</mn>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mn>0</mn>
</mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>3</mn>
</mtd>
</mtr>
</mtable>
<mo>}</mo>
</mrow>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mrow>
<mn>512</mn>
<mo>−<!-- − --></mo>
<mn>0</mn>
</mrow>
<mn>999</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mn>512</mn>
<mn>999</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
</mtr>
<mtr>
<mtd>
<mn>1.09191</mn>
<mo>…<!-- … --></mo>
</mtd>
<mtd>
<mo>=</mo>
<mn>1.0</mn>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mn>91</mn>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">I</mi>
</mrow>
<mo>=</mo>
<mn>1</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mn>0</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>91</mn>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mn>1</mn>
</mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>2</mn>
</mtd>
</mtr>
</mtable>
<mo>}</mo>
</mrow>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mrow>
<mn>1091</mn>
<mo>−<!-- − --></mo>
<mn>10</mn>
</mrow>
<mn>990</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mn>1081</mn>
<mn>990</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
</mtr>
<mtr>
<mtd>
<mn>1.333</mn>
<mo>…<!-- … --></mo>
</mtd>
<mtd>
<mo>=</mo>
<mn>1.</mn>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mn>3</mn>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">I</mi>
</mrow>
<mo>=</mo>
<mn>1</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mi mathvariant="normal">∅<!-- ∅ --></mi>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>3</mn>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mn>0</mn>
</mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
<mo>}</mo>
</mrow>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mrow>
<mn>13</mn>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mn>9</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mn>12</mn>
<mn>9</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mn>4</mn>
<mn>3</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
</mtr>
<mtr>
<mtd>
<mn>0.3789789</mn>
<mo>…<!-- … --></mo>
</mtd>
<mtd>
<mo>=</mo>
<mn>0.3</mn>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mn>789</mn>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>{</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">I</mi>
</mrow>
<mo>=</mo>
<mn>0</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mn>3</mn>
</mtd>
<mtd>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>789</mn>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mn>1</mn>
</mtd>
<mtd>
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">P</mi>
</mrow>
<mo>=</mo>
<mn>3</mn>
</mtd>
</mtr>
</mtable>
<mo>}</mo>
</mrow>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mrow>
<mn>3789</mn>
<mo>−<!-- − --></mo>
<mn>3</mn>
</mrow>
<mn>9990</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mn>3786</mn>
<mn>9990</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
<mtd>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mfrac>
<mn>631</mn>
<mn>1665</mn>
</mfrac>
</mstyle>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{array}{lllll}3.254444\ldots &amp;=3.25{\overline {4}}&amp;={\begin{Bmatrix}\mathbf {I} =3&amp;\mathbf {A} =25&amp;\mathbf {P} =4\\&amp;\#\mathbf {A} =2&amp;\#\mathbf {P} =1\end{Bmatrix}}&amp;={\dfrac {3254-325}{900}}&amp;={\dfrac {2929}{900}}\\\\0.512512\ldots &amp;=0.{\overline {512}}&amp;={\begin{Bmatrix}\mathbf {I} =0&amp;\mathbf {A} =\emptyset &amp;\mathbf {P} =512\\&amp;\#\mathbf {A} =0&amp;\#\mathbf {P} =3\end{Bmatrix}}&amp;={\dfrac {512-0}{999}}&amp;={\dfrac {512}{999}}\\\\1.09191\ldots &amp;=1.0{\overline {91}}&amp;={\begin{Bmatrix}\mathbf {I} =1&amp;\mathbf {A} =0&amp;\mathbf {P} =91\\&amp;\#\mathbf {A} =1&amp;\#\mathbf {P} =2\end{Bmatrix}}&amp;={\dfrac {1091-10}{990}}&amp;={\dfrac {1081}{990}}\\\\1.333\ldots &amp;=1.{\overline {3}}&amp;={\begin{Bmatrix}\mathbf {I} =1&amp;\mathbf {A} =\emptyset &amp;\mathbf {P} =3\\&amp;\#\mathbf {A} =0&amp;\#\mathbf {P} =1\end{Bmatrix}}&amp;={\dfrac {13-1}{9}}&amp;={\dfrac {12}{9}}&amp;={\dfrac {4}{3}}\\\\0.3789789\ldots &amp;=0.3{\overline {789}}&amp;={\begin{Bmatrix}\mathbf {I} =0&amp;\mathbf {A} =3&amp;\mathbf {P} =789\\&amp;\#\mathbf {A} =1&amp;\#\mathbf {P} =3\end{Bmatrix}}&amp;={\dfrac {3789-3}{9990}}&amp;={\dfrac {3786}{9990}}&amp;={\dfrac {631}{1665}}\end{array}}}</annotation>
</semantics>
</math></span></span>
</p><p>The symbol <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \emptyset }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">∅<!-- ∅ --></mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \emptyset }</annotation>
</semantics>
</math></span><img src="./6af50205f42bb2ec3c666b7b847d2c7f96e464c7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:1.162ex; height:2.509ex;" alt="{\displaystyle \emptyset }" loading="lazy"></span> in the examples above denotes the absence of digits of part <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbf {A} }">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbf {A} }</annotation>
</semantics>
</math></span><img src="./0795cc96c75d81520a120482662b90f024c9a1a1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.019ex; height:2.176ex;" alt="{\displaystyle \mathbf {A} }" loading="lazy"></span> in the decimal, and therefore <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \#\mathbf {A} =0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi mathvariant="normal">#<!-- # --></mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold">A</mi>
</mrow>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \#\mathbf {A} =0}</annotation>
</semantics>
</math></span><img src="./6655dcdc7daf1eaeeb38ad8ae80ad76db6e2b3d3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:8.216ex; height:2.509ex;" alt="{\displaystyle \#\mathbf {A} =0}" loading="lazy"></span> and a corresponding absence in the generated fraction.
</p>
<div class="mw-heading mw-heading2"><h2 id="Repeating_decimals_as_infinite_series">Repeating decimals as infinite series</h2></div>
<p>A repeating decimal can also be expressed as an <a href="Infinite_series" class="mw-redirect" title="Infinite series">infinite series</a>. That is, a repeating decimal can be regarded as the sum of an infinite number of rational numbers. To take the simplest example,
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 0.{\overline {1}}={\frac {1}{10}}+{\frac {1}{100}}+{\frac {1}{1000}}+\cdots =\sum _{n=1}^{\infty }{\frac {1}{10^{n}}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mn>0.</mn>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mn>1</mn>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>10</mn>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>100</mn>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>1000</mn>
</mfrac>
</mrow>
<mo>+</mo>
<mo>⋯<!-- ⋯ --></mo>
<mo>=</mo>
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">∞<!-- ∞ --></mi>
</mrow>
</munderover>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msup>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 0.{\overline {1}}={\frac {1}{10}}+{\frac {1}{100}}+{\frac {1}{1000}}+\cdots =\sum _{n=1}^{\infty }{\frac {1}{10^{n}}}}</annotation>
</semantics>
</math></span><img src="./2238fe61d70636da4f6b5666194b2f95af719fcc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:41.62ex; height:6.843ex;" alt="{\displaystyle 0.{\overline {1}}={\frac {1}{10}}+{\frac {1}{100}}+{\frac {1}{1000}}+\cdots =\sum _{n=1}^{\infty }{\frac {1}{10^{n}}}}" loading="lazy"></span></dd></dl>
<p>The above series is a <a href="Geometric_series" title="Geometric series">geometric series</a> with the first term as <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> and the common factor <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span>. Because the absolute value of the common factor is less than 1, we can say that the geometric series <a href="Convergent_series" title="Convergent series">converges</a> and find the exact value in the form of a fraction by using the following formula where <i>a</i> is the first term of the series and <i>r</i> is the common factor.
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {a}{1-r}}={\frac {\frac {1}{10}}{1-{\frac {1}{10}}}}={\frac {1}{10-1}}={\frac {1}{9}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>a</mi>
<mrow>
<mn>1</mn>
<mo>−<!-- − --></mo>
<mi>r</mi>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mfrac>
<mn>1</mn>
<mn>10</mn>
</mfrac>
<mrow>
<mn>1</mn>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>10</mn>
</mfrac>
</mrow>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mrow>
<mn>10</mn>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>9</mn>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {a}{1-r}}={\frac {\frac {1}{10}}{1-{\frac {1}{10}}}}={\frac {1}{10-1}}={\frac {1}{9}}}</annotation>
</semantics>
</math></span><img src="./66d4555a6d732464008a18b6225cc16a732a5eb8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.505ex; width:31.665ex; height:8.176ex;" alt="{\displaystyle {\frac {a}{1-r}}={\frac {\frac {1}{10}}{1-{\frac {1}{10}}}}={\frac {1}{10-1}}={\frac {1}{9}}}" loading="lazy"></span></dd></dl>
<p>Similarly,
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}0.{\overline {142857}}&amp;={\frac {142857}{10^{6}}}+{\frac {142857}{10^{12}}}+{\frac {142857}{10^{18}}}+\cdots =\sum _{n=1}^{\infty }{\frac {142857}{10^{6n}}}\\[6px]\implies &amp;\quad {\frac {a}{1-r}}={\frac {\frac {142857}{10^{6}}}{1-{\frac {1}{10^{6}}}}}={\frac {142857}{10^{6}-1}}={\frac {142857}{999999}}={\frac {1}{7}}\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="0.9em 0.3em" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mn>0.</mn>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mn>142857</mn>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>142857</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>6</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>142857</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>12</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>142857</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>18</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mo>⋯<!-- ⋯ --></mo>
<mo>=</mo>
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">∞<!-- ∞ --></mi>
</mrow>
</munderover>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>142857</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>6</mn>
<mi>n</mi>
</mrow>
</msup>
</mfrac>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mspace width="thickmathspace"></mspace>
<mo stretchy="false">⟹<!-- ⟹ --></mo>
<mspace width="thickmathspace"></mspace>
</mtd>
<mtd>
<mspace width="1em"></mspace>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>a</mi>
<mrow>
<mn>1</mn>
<mo>−<!-- − --></mo>
<mi>r</mi>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mfrac>
<mn>142857</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>6</mn>
</mrow>
</msup>
</mfrac>
<mrow>
<mn>1</mn>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>6</mn>
</mrow>
</msup>
</mfrac>
</mrow>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>142857</mn>
<mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>6</mn>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>142857</mn>
<mn>999999</mn>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>7</mn>
</mfrac>
</mrow>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}0.{\overline {142857}}&amp;={\frac {142857}{10^{6}}}+{\frac {142857}{10^{12}}}+{\frac {142857}{10^{18}}}+\cdots =\sum _{n=1}^{\infty }{\frac {142857}{10^{6n}}}\\[6px]\implies &amp;\quad {\frac {a}{1-r}}={\frac {\frac {142857}{10^{6}}}{1-{\frac {1}{10^{6}}}}}={\frac {142857}{10^{6}-1}}={\frac {142857}{999999}}={\frac {1}{7}}\end{aligned}}}</annotation>
</semantics>
</math></span><img src="./b641179f87b6e5f31361e4a13892afeb2a0e19d5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -8.171ex; width:62.077ex; height:17.343ex;" alt="{\displaystyle {\begin{aligned}0.{\overline {142857}}&amp;={\frac {142857}{10^{6}}}+{\frac {142857}{10^{12}}}+{\frac {142857}{10^{18}}}+\cdots =\sum _{n=1}^{\infty }{\frac {142857}{10^{6n}}}\\[6px]\implies &amp;\quad {\frac {a}{1-r}}={\frac {\frac {142857}{10^{6}}}{1-{\frac {1}{10^{6}}}}}={\frac {142857}{10^{6}-1}}={\frac {142857}{999999}}={\frac {1}{7}}\end{aligned}}}" loading="lazy"></span></dd></dl>
<div class="mw-heading mw-heading2"><h2 id="Multiplication_and_cyclic_permutation">Multiplication and cyclic permutation</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Transposable_integer" title="Transposable integer">Transposable integer</a></div>
<p>The cyclic behavior of repeating decimals in multiplication also leads to the construction of integers which are <a href="Cyclic_permutation" title="Cyclic permutation">cyclically permuted</a> when multiplied by certain numbers. For example, <span class="nowrap">102564 × 4 = 410256</span>. 102564 is the repetend of <span class="sfrac">⁠<span class="tion"><span class="num">4</span><span class="sr-only">/</span><span class="den">39</span></span>⁠</span> and 410256 the repetend of <span class="sfrac">⁠<span class="tion"><span class="num">16</span><span class="sr-only">/</span><span class="den">39</span></span>⁠</span>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Other_properties_of_repetend_lengths">Other properties of repetend lengths</h2></div>
<p>Various properties of repetend lengths (periods) are given by Mitchell<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> and Dickson.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li>The period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span> for integer <i>k</i> is always ≤&nbsp;<i>k</i>&nbsp;−&nbsp;1.</li>
<li>If <i>p</i> is prime, the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> divides evenly into <i>p</i>&nbsp;−&nbsp;1.</li>
<li>If <i>k</i> is composite, the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span> is strictly less than <i>k</i>&nbsp;−&nbsp;1.</li>
<li>The period of <span class="sfrac">⁠<span class="tion"><span class="num"><i>c</i></span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span>, for <i>c</i> <a href="Coprime" class="mw-redirect" title="Coprime">coprime</a> to <i>k</i>, equals the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span>.</li>
<li>If <i>k</i>&nbsp;=&nbsp;2<sup><i>a</i></sup>·5<sup><i>b</i></sup><i>n</i> where <i>n</i>&nbsp;&gt;&nbsp;1 and <i>n</i> is not divisible by 2 or 5, then the length of the transient of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span> is max(<i>a</i>,&nbsp;<i>b</i>), and the period equals <i>r</i>, where <i>r</i> is the <a href="Multiplicative_order" title="Multiplicative order">multiplicative order</a> of 10 mod n, that is the smallest integer such that <span class="nowrap">10<sup><i>r</i></sup> ≡ 1 (mod <i>n</i>)</span>.</li>
<li>If <i>p</i>, <i>p′</i>, <i>p″</i>,... are distinct primes, then the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i> <i>p′</i> <i>p″</i> ⋯</span></span>⁠</span> equals the lowest common multiple of the periods of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p′</i></span></span>⁠</span>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p″</i></span></span>⁠</span>,....</li>
<li>If <i>k</i> and <i>k′</i> have no common prime factors other than 2 or 5, then the period of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k k′</i></span></span>⁠</span> equals the least common multiple of the periods of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k</i></span></span>⁠</span> and <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>k′</i></span></span>⁠</span>.</li>
<li>For prime <i>p</i>, if</li></ul>
<dl><dd><dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\text{period}}\left({\frac {1}{p}}\right)={\text{period}}\left({\frac {1}{p^{2}}}\right)=\cdots ={\text{period}}\left({\frac {1}{p^{m}}}\right)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtext>period</mtext>
</mrow>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mi>p</mi>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mtext>period</mtext>
</mrow>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
<mo>=</mo>
<mo>⋯<!-- ⋯ --></mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mtext>period</mtext>
</mrow>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\text{period}}\left({\frac {1}{p}}\right)={\text{period}}\left({\frac {1}{p^{2}}}\right)=\cdots ={\text{period}}\left({\frac {1}{p^{m}}}\right)}</annotation>
</semantics>
</math></span><img src="./e6bb5bb609446628fd74c25bbd05f15c75e5e971.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:51.204ex; height:6.176ex;" alt="{\displaystyle {\text{period}}\left({\frac {1}{p}}\right)={\text{period}}\left({\frac {1}{p^{2}}}\right)=\cdots ={\text{period}}\left({\frac {1}{p^{m}}}\right)}" loading="lazy"></span></dd></dl></dd>
<dd>for some <i>m</i>, but
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\text{period}}\left({\frac {1}{p^{m}}}\right)\neq {\text{period}}\left({\frac {1}{p^{m+1}}}\right),}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtext>period</mtext>
</mrow>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
<mo>≠<!-- ≠ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mtext>period</mtext>
</mrow>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\text{period}}\left({\frac {1}{p^{m}}}\right)\neq {\text{period}}\left({\frac {1}{p^{m+1}}}\right),}</annotation>
</semantics>
</math></span><img src="./3d4d1531be5792910cb0a865b8fedccf509c14d7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:33.887ex; height:6.176ex;" alt="{\displaystyle {\text{period}}\left({\frac {1}{p^{m}}}\right)\neq {\text{period}}\left({\frac {1}{p^{m+1}}}\right),}" loading="lazy"></span></dd></dl></dd>
<dd>then for <i>c</i>&nbsp;≥&nbsp;0 we have
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\text{period}}\left({\frac {1}{p^{m+c}}}\right)=p^{c}\cdot {\text{period}}\left({\frac {1}{p}}\right).}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtext>period</mtext>
</mrow>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
<mo>+</mo>
<mi>c</mi>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
<mo>=</mo>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>c</mi>
</mrow>
</msup>
<mo>⋅<!-- ⋅ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mtext>period</mtext>
</mrow>
<mrow>
<mo>(</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mi>p</mi>
</mfrac>
</mrow>
<mo>)</mo>
</mrow>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\text{period}}\left({\frac {1}{p^{m+c}}}\right)=p^{c}\cdot {\text{period}}\left({\frac {1}{p}}\right).}</annotation>
</semantics>
</math></span><img src="./099b983765f03e24219f12dca9170a694b7b34e0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:35.895ex; height:6.176ex;" alt="{\displaystyle {\text{period}}\left({\frac {1}{p^{m+c}}}\right)=p^{c}\cdot {\text{period}}\left({\frac {1}{p}}\right).}" loading="lazy"></span></dd></dl></dd></dl>
<ul><li>If <i>p</i> is a <b>proper prime</b> ending in a 1, that is, if the repetend of <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den"><i>p</i></span></span>⁠</span> is a cyclic number of length <i>p</i>&nbsp;−&nbsp;1 and <i>p</i> = 10<i>h</i>&nbsp;+&nbsp;1 for some <i>h</i>, then each digit 0, 1, ..., 9 appears in the repetend exactly <i>h</i> =&nbsp;<span class="sfrac">⁠<span class="tion"><span class="num"><i>p</i>&nbsp;−&nbsp;1</span><span class="sr-only">/</span><span class="den">10</span></span>⁠</span> times.</li></ul>
<p>For some other properties of repetends, see also.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Extension_to_other_bases">Extension to other bases</h2></div>
<p>Various features of repeating decimals extend to the representation of numbers in all other integer bases, not just base 10:
</p>
<ul><li>Every real number can be represented as an integer part followed by a <a href="Radix" title="Radix">radix</a> point (the generalization of a <a href="Decimal_point" class="mw-redirect" title="Decimal point">decimal point</a> to non-decimal systems) followed by a finite or infinite number of <a href="Numerical_digit" title="Numerical digit">digits</a>.</li>
<li>If the base is an integer, a <i>terminating</i> sequence obviously represents a rational number.</li>
<li>A rational number has a terminating sequence if all the prime factors of the denominator of the fully reduced fractional form are also factors of the base. These numbers make up a <a href="Dense_set" title="Dense set">dense set</a> in <span class="texhtml"><b>Q</b></span> and <span class="texhtml"><b>R</b></span>.</li>
<li>If the <a href="Positional_notation" title="Positional notation">positional numeral system</a> is a standard one, that is it has base</li></ul>
<dl><dd><dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle b\in \mathbb {Z} \smallsetminus \{-1,0,1\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>b</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mo>∖<!-- ∖ --></mo>
<mo fence="false" stretchy="false">{</mo>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo>,</mo>
<mn>0</mn>
<mo>,</mo>
<mn>1</mn>
<mo fence="false" stretchy="false">}</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle b\in \mathbb {Z} \smallsetminus \{-1,0,1\}}</annotation>
</semantics>
</math></span><img src="./4f1498adef20545607bc265f16ab25d2b18a65e4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:17.917ex; height:2.843ex;" alt="{\displaystyle b\in \mathbb {Z} \smallsetminus \{-1,0,1\}}" loading="lazy"></span></dd></dl></dd>
<dd>combined with a consecutive set of digits
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle D:=\{d_{1},d_{1}+1,\dots ,d_{r}\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>D</mi>
<mo>:=</mo>
<mo fence="false" stretchy="false">{</mo>
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>,</mo>
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>+</mo>
<mn>1</mn>
<mo>,</mo>
<mo>…<!-- … --></mo>
<mo>,</mo>
<msub>
<mi>d</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
</mrow>
</msub>
<mo fence="false" stretchy="false">}</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle D:=\{d_{1},d_{1}+1,\dots ,d_{r}\}}</annotation>
</semantics>
</math></span><img src="./440159dc9938a423e96e62f245799e2d0bb89d64.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:24.918ex; height:2.843ex;" alt="{\displaystyle D:=\{d_{1},d_{1}+1,\dots ,d_{r}\}}" loading="lazy"></span></dd></dl></dd>
<dd>with <span class="texhtml"><i>r</i>&nbsp;:= |<span class="nowrap" style="padding-left:0.1em; padding-right:0.1em;">b</span>|</span>, <span class="texhtml"><i>d<sub>r</sub></i>&nbsp;:= d<sub>1</sub> + <i>r</i> − 1</span> and <span class="texhtml">0 ∈ <i>D</i></span>, then a terminating sequence is obviously equivalent to the same sequence with <i>non-terminating</i> repeating part consisting of the digit 0. If the base is positive, then there exists an <a href="Order_isomorphism" title="Order isomorphism">order homomorphism</a> from the <a href="String_(computer_science)#Lexicographical_ordering" title="String (computer science)">lexicographical order</a> of the <a href="Sequence#Finite_and_infinite" title="Sequence">right-sided infinite strings</a> over the <a href="Alphabet" title="Alphabet">alphabet</a> <span class="texhtml"><i>D</i></span> into some closed interval of the reals, which maps the strings <span class="texhtml">0.<i>A</i><sub>1</sub><i>A</i><sub>2</sub>...<i>A</i><sub><i>n</i></sub><span style="text-decoration:overline;"><i>d<sub>b</sub></i></span></span> and <span class="texhtml">0.<i>A</i><sub>1</sub><i>A</i><sub>2</sub>...(<i>A<sub>n</sub></i>+1)<span style="text-decoration:overline;"><i>d</i><sub>1</sub></span></span> with <span class="texhtml"><i>A<sub>i</sub></i> ∈ <i>D</i></span> and <span class="texhtml"><i>A<sub>n</sub></i> ≠ <i>d<sub>b</sub></i></span> to the same real number – and there are no other duplicate images. In the decimal system, for example, there is 0.<span style="text-decoration:overline;">9</span>&nbsp;=&nbsp;1.<span style="text-decoration:overline;">0</span>&nbsp;=&nbsp;1; in the <a href="Balanced_ternary" title="Balanced ternary">balanced ternary</a> system there is 0.<span style="text-decoration:overline;">1</span>&nbsp;=&nbsp;1.<span style="text-decoration:overline;">T</span>&nbsp;=&nbsp;<span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>⁠</span>.</dd></dl>
<ul><li>A rational number has an indefinitely repeating sequence of finite length <span class="texhtml mvar" style="font-style:italic;">l</span>, if the reduced fraction's denominator contains a prime factor that is not a factor of the base. If <span class="texhtml mvar" style="font-style:italic;">q</span> is the maximal factor of the reduced denominator which is coprime to the base, <span class="texhtml mvar" style="font-style:italic;">l</span> is the smallest exponent such that <span class="texhtml mvar" style="font-style:italic;">q</span> divides <span class="texhtml"><i>b</i><sup><i>ℓ</i></sup> − 1</span>. It is the <a href="Multiplicative_order" title="Multiplicative order">multiplicative order</a> <span class="texhtml">ord<sub><i>q</i></sub>(<i>b</i>)</span> of the residue class <span class="texhtml"><i>b</i> mod <i>q</i></span> which is a divisor of the <a href="Carmichael_function" title="Carmichael function">Carmichael function</a> <span class="texhtml"><i>λ</i>(<i>q</i>)</span> which in turn is smaller than <span class="texhtml mvar" style="font-style:italic;">q</span>. The repeating sequence is preceded by a transient of finite length if the reduced fraction also shares a prime factor with the base. A repeating sequence</li></ul>
<dl><dd><dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left(0.{\overline {A_{1}A_{2}\ldots A_{\ell }}}\right)_{b}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mrow>
<mo>(</mo>
<mrow>
<mn>0.</mn>
<mrow class="MJX-TeXAtom-ORD">
<mover>
<mrow>
<msub>
<mi>A</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>A</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>…<!-- … --></mo>
<msub>
<mi>A</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>ℓ<!-- ℓ --></mi>
</mrow>
</msub>
</mrow>
<mo accent="false">¯<!-- ¯ --></mo>
</mover>
</mrow>
</mrow>
<mo>)</mo>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>b</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \left(0.{\overline {A_{1}A_{2}\ldots A_{\ell }}}\right)_{b}}</annotation>
</semantics>
</math></span><img src="./2e49c18417a4fd4884c5df63e704a6dd707e4689.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:17.391ex; height:4.843ex;" alt="{\displaystyle \left(0.{\overline {A_{1}A_{2}\ldots A_{\ell }}}\right)_{b}}" loading="lazy"></span></dd></dl></dd>
<dd>represents the fraction
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {(A_{1}A_{2}\ldots A_{\ell })_{b}}{b^{\ell }-1}}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mo stretchy="false">(</mo>
<msub>
<mi>A</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<msub>
<mi>A</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo>…<!-- … --></mo>
<msub>
<mi>A</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>ℓ<!-- ℓ --></mi>
</mrow>
</msub>
<msub>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>b</mi>
</mrow>
</msub>
</mrow>
<mrow>
<msup>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>ℓ<!-- ℓ --></mi>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</mfrac>
</mrow>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {(A_{1}A_{2}\ldots A_{\ell })_{b}}{b^{\ell }-1}}.}</annotation>
</semantics>
</math></span><img src="./f7c36bd49309e777c2a330928c3c14e60f5b335f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:15.983ex; height:6.176ex;" alt="{\displaystyle {\frac {(A_{1}A_{2}\ldots A_{\ell })_{b}}{b^{\ell }-1}}.}" loading="lazy"></span></dd></dl></dd></dl>
<ul><li>An irrational number has a representation of infinite length that is not, from any point, an indefinitely repeating sequence of finite length.</li></ul>
<p>For example, in <a href="Duodecimal" title="Duodecimal">duodecimal</a>, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">2</span></span>⁠</span> = 0.6, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">3</span></span>⁠</span> = 0.4, <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">4</span></span>⁠</span> = 0.3 and <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">6</span></span>⁠</span> = 0.2 all terminate; <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">5</span></span>⁠</span> = 0.<span style="text-decoration:overline;">2497</span> repeats with period length 4, in contrast with the equivalent decimal expansion of 0.2; <span class="sfrac">⁠<span class="tion"><span class="num">1</span><span class="sr-only">/</span><span class="den">7</span></span>⁠</span> = 0.<span style="text-decoration:overline;">186A35</span> has period 6 in duodecimal, just as it does in decimal.
</p><p>If <span class="texhtml mvar" style="font-style:italic;">b</span> is an integer base and <span class="texhtml mvar" style="font-style:italic;">k</span> is an integer, then
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {1}{k}}={\frac {1}{b}}+{\frac {(b-k)^{1}}{b^{2}}}+{\frac {(b-k)^{2}}{b^{3}}}+{\frac {(b-k)^{3}}{b^{4}}}+\cdots +{\frac {(b-k)^{N-1}}{b^{N}}}+\cdots ={\frac {1}{b}}{\frac {1}{1-{\frac {b-k}{b}}}}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mi>k</mi>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mi>b</mi>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mo stretchy="false">(</mo>
<mi>b</mi>
<mo>−<!-- − --></mo>
<mi>k</mi>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msup>
</mrow>
<msup>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mo stretchy="false">(</mo>
<mi>b</mi>
<mo>−<!-- − --></mo>
<mi>k</mi>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mrow>
<msup>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mo stretchy="false">(</mo>
<mi>b</mi>
<mo>−<!-- − --></mo>
<mi>k</mi>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
</mrow>
<msup>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mo>⋯<!-- ⋯ --></mo>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mo stretchy="false">(</mo>
<mi>b</mi>
<mo>−<!-- − --></mo>
<mi>k</mi>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>N</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
</mrow>
<msup>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>N</mi>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mo>⋯<!-- ⋯ --></mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mi>b</mi>
</mfrac>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mrow>
<mn>1</mn>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi>b</mi>
<mo>−<!-- − --></mo>
<mi>k</mi>
</mrow>
<mi>b</mi>
</mfrac>
</mrow>
</mrow>
</mfrac>
</mrow>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {1}{k}}={\frac {1}{b}}+{\frac {(b-k)^{1}}{b^{2}}}+{\frac {(b-k)^{2}}{b^{3}}}+{\frac {(b-k)^{3}}{b^{4}}}+\cdots +{\frac {(b-k)^{N-1}}{b^{N}}}+\cdots ={\frac {1}{b}}{\frac {1}{1-{\frac {b-k}{b}}}}.}</annotation>
</semantics>
</math></span><img src="./7809fcadf4e6d09289a3d0dd18fada41634f5428.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.671ex; width:81.626ex; height:7.676ex;" alt="{\displaystyle {\frac {1}{k}}={\frac {1}{b}}+{\frac {(b-k)^{1}}{b^{2}}}+{\frac {(b-k)^{2}}{b^{3}}}+{\frac {(b-k)^{3}}{b^{4}}}+\cdots +{\frac {(b-k)^{N-1}}{b^{N}}}+\cdots ={\frac {1}{b}}{\frac {1}{1-{\frac {b-k}{b}}}}.}" loading="lazy"></span></dd></dl>
<p>For example 1/7 in duodecimal:
<span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {1}{7}}=\left({\frac {1}{10^{\phantom {1}}}}+{\frac {5}{10^{2}}}+{\frac {21}{10^{3}}}+{\frac {A5}{10^{4}}}+{\frac {441}{10^{5}}}+{\frac {1985}{10^{6}}}+\cdots \right)_{\text{base 12}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mn>7</mn>
</mfrac>
</mrow>
<mo>=</mo>
<msub>
<mrow>
<mo>(</mo>
<mrow>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mphantom>
<mn>1</mn>
</mphantom>
</mrow>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>5</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>21</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi>A</mi>
<mn>5</mn>
</mrow>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>441</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>5</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1985</mn>
<msup>
<mn>10</mn>
<mrow class="MJX-TeXAtom-ORD">
<mn>6</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>+</mo>
<mo>⋯<!-- ⋯ --></mo>
</mrow>
<mo>)</mo>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mtext>base 12</mtext>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {1}{7}}=\left({\frac {1}{10^{\phantom {1}}}}+{\frac {5}{10^{2}}}+{\frac {21}{10^{3}}}+{\frac {A5}{10^{4}}}+{\frac {441}{10^{5}}}+{\frac {1985}{10^{6}}}+\cdots \right)_{\text{base 12}}}</annotation>
</semantics>
</math></span></span>
</p><p>which is 0.<span style="text-decoration:overline;">186A35</span><sub>base12</sub>. 10<sub>base12</sub> is 12<sub>base10</sub>, 10<sup>2</sup><sub>base12</sub> is 144<sub>base10</sub>, 21<sub>base12</sub> is 25<sub>base10</sub>, A5<sub>base12</sub> is 125<sub>base10</sub>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Algorithm_for_positive_bases">Algorithm for positive bases</h3></div>
<p>For a rational <span class="texhtml">0 &lt; <span class="sfrac">⁠<span class="tion"><span class="num"><i>p</i></span><span class="sr-only">/</span><span class="den"><i>q</i></span></span>⁠</span> &lt; 1</span> (and base <span class="texhtml"><i>b</i> ∈ <b>N</b><sub>&gt;1</sub></span>) there is the following algorithm producing the repetend together with its length:
</p>
<div class="mw-highlight mw-highlight-lang-mupad mw-content-ltr" dir="ltr"><pre><span class="nv">function</span><span class="w"> </span><span class="nf">b_adic</span><span class="p">(</span><span class="nv">b</span><span class="o">,</span><span class="nv">p</span><span class="o">,</span><span class="nv">q</span><span class="p">)</span><span class="w"> </span><span class="c1">// b ≥ 2; 0 &lt; p &lt; q</span>
<span class="w"> </span><span class="nv">digits</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"0123..."</span><span class="o">;</span><span class="w"> </span><span class="c1">// up to the digit with value b–1</span>
<span class="k">begin</span>
<span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">""</span><span class="o">;</span><span class="w"> </span><span class="c1">// the string of digits</span>
<span class="w"> </span><span class="nv">pos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="o">;</span><span class="w"> </span><span class="c1">// all places are right to the radix point</span>
<span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="ow">not</span><span class="w"> </span><span class="nf">defined</span><span class="p">(</span><span class="nv">occurs</span><span class="p">[</span><span class="nv">p</span><span class="p">])</span><span class="w"> </span><span class="k">do</span>
<span class="w"> </span><span class="nv">occurs</span><span class="p">[</span><span class="nv">p</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">pos</span><span class="o">;</span><span class="w"> </span><span class="c1">// the position of the place with remainder p</span>
<span class="w"> </span><span class="nv">bp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">b</span><span class="o">*</span><span class="nv">p</span><span class="o">;</span>
<span class="hll"><span class="w"> </span><span class="nv">z</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">floor</span><span class="p">(</span><span class="nv">bp</span><span class="o">/</span><span class="nv">q</span><span class="p">)</span><span class="o">;</span><span class="w"> </span><span class="c1">// index z of digit within: 0 ≤ z ≤ b-1</span>
</span><span class="hll"><span class="w"> </span><span class="nv">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">b</span><span class="o">*</span><span class="nv">p</span><span class="w"> </span>−<span class="w"> </span><span class="nv">z</span><span class="o">*</span><span class="nv">q</span><span class="o">;</span><span class="w"> </span><span class="c1">// 0 ≤ p &lt; q</span>
</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="nv">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="k">then</span><span class="w"> </span><span class="nv">L</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="o">;</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="ow">not</span><span class="w"> </span><span class="nv">z</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="w"> </span><span class="k">then</span>
<span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">.</span><span class="w"> </span><span class="nf">substring</span><span class="p">(</span><span class="nv">digits</span><span class="o">,</span><span class="w"> </span><span class="nv">z</span><span class="o">,</span><span class="w"> </span><span class="m">1</span><span class="p">)</span><span class="w"> </span>
<span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">if</span>
<span class="w"> </span><span class="nf">return</span> <span class="p">(</span><span class="nv">s</span><span class="p">)</span><span class="o">;</span>
<span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">if</span>
<span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">s</span><span class="w"> </span><span class="o">.</span><span class="w"> </span><span class="nf">substring</span><span class="p">(</span><span class="nv">digits</span><span class="o">,</span><span class="w"> </span><span class="nv">z</span><span class="o">,</span><span class="w"> </span><span class="m">1</span><span class="p">)</span><span class="o">;</span><span class="w"> </span><span class="c1">// append the character of the digit</span>
<span class="w"> </span><span class="nv">pos</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="m">1</span><span class="o">;</span>
<span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">while</span>
<span class="w"> </span><span class="nv">L</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">pos</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="nv">occurs</span><span class="p">[</span><span class="nv">p</span><span class="p">]</span><span class="o">;</span><span class="w"> </span><span class="c1">// the length of the repetend (being &lt; q)</span>
<span class="w"> </span><span class="c1">// mark the digits of the repetend by a vinculum:</span>
<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="nv">i</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="nv">occurs</span><span class="p">[</span><span class="nv">p</span><span class="p">]</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="nv">pos</span><span class="o">-</span><span class="m">1</span><span class="w"> </span><span class="k">do</span>
<span class="w"> </span><span class="nf">substring</span><span class="p">(</span><span class="nv">s</span><span class="o">,</span><span class="w"> </span><span class="nv">i</span><span class="o">,</span><span class="w"> </span><span class="m">1</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">overline</span><span class="p">(</span><span class="nf">substring</span><span class="p">(</span><span class="nv">s</span><span class="o">,</span><span class="w"> </span><span class="nv">i</span><span class="o">,</span><span class="w"> </span><span class="m">1</span><span class="p">))</span><span class="o">;</span>
<span class="w"> </span><span class="k">end</span><span class="w"> </span><span class="k">for</span>
<span class="w"> </span><span class="nf">return</span> <span class="p">(</span><span class="nv">s</span><span class="p">)</span><span class="o">;</span>
<span class="k">end</span><span class="w"> </span><span class="nv">function</span>
</pre></div>
<p>The first highlighted line calculates the digit <span class="texhtml mvar" style="font-style:italic;">z</span>.
</p><p>The subsequent line calculates the new remainder <span class="texhtml mvar" style="font-style:italic;">p′</span> of the division <a href="Modular_arithmetic" title="Modular arithmetic">modulo</a> the denominator <span class="texhtml mvar" style="font-style:italic;">q</span>. As a consequence of the <a href="Floor_and_ceiling_functions" title="Floor and ceiling functions">floor function</a> <code>floor</code> we have
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {bp}{q}}-1\;\;<\;\;z=\left\lfloor {\frac {bp}{q}}\right\rfloor \;\;\leq \;\;{\frac {bp}{q}},}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi>b</mi>
<mi>p</mi>
</mrow>
<mi>q</mi>
</mfrac>
</mrow>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mspace width="thickmathspace"></mspace>
<mspace width="thickmathspace"></mspace>
<mo>&lt;</mo>
<mspace width="thickmathspace"></mspace>
<mspace width="thickmathspace"></mspace>
<mi>z</mi>
<mo>=</mo>
<mrow>
<mo>⌊</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi>b</mi>
<mi>p</mi>
</mrow>
<mi>q</mi>
</mfrac>
</mrow>
<mo>⌋</mo>
</mrow>
<mspace width="thickmathspace"></mspace>
<mspace width="thickmathspace"></mspace>
<mo>≤<!-- ≤ --></mo>
<mspace width="thickmathspace"></mspace>
<mspace width="thickmathspace"></mspace>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi>b</mi>
<mi>p</mi>
</mrow>
<mi>q</mi>
</mfrac>
</mrow>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {bp}{q}}-1\;\;&lt;\;\;z=\left\lfloor {\frac {bp}{q}}\right\rfloor \;\;\leq \;\;{\frac {bp}{q}},}</annotation>
</semantics>
</math></span><img src="./8ee4587b4380cef1fb47c962cbf4bd144c0e274b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:31.914ex; height:6.176ex;" alt="{\displaystyle {\frac {bp}{q}}-1\;\;<\;\;z=\left\lfloor {\frac {bp}{q}}\right\rfloor \;\;\leq \;\;{\frac {bp}{q}},}" loading="lazy"></span></dd></dl>
<p>thus
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle bp-q<zq\quad \implies \quad p':=bp-zq<q}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>b</mi>
<mi>p</mi>
<mo>−<!-- − --></mo>
<mi>q</mi>
<mo>&lt;</mo>
<mi>z</mi>
<mi>q</mi>
<mspace width="1em"></mspace>
<mspace width="thickmathspace"></mspace>
<mo stretchy="false">⟹<!-- ⟹ --></mo>
<mspace width="thickmathspace"></mspace>
<mspace width="1em"></mspace>
<msup>
<mi>p</mi>
<mo>′</mo>
</msup>
<mo>:=</mo>
<mi>b</mi>
<mi>p</mi>
<mo>−<!-- − --></mo>
<mi>z</mi>
<mi>q</mi>
<mo>&lt;</mo>
<mi>q</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle bp-q&lt;zq\quad \implies \quad p':=bp-zq&lt;q}</annotation>
</semantics>
</math></span><img src="./0518b0f5ba3c328642bb709181043914cf06d9a8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:39.297ex; height:2.843ex;" alt="{\displaystyle bp-q<zq\quad \implies \quad p':=bp-zq<q}" loading="lazy"></span></dd></dl>
<p>and
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle zq\leq bp\quad \implies \quad 0\leq bp-zq=:p'\,.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>z</mi>
<mi>q</mi>
<mo>≤<!-- ≤ --></mo>
<mi>b</mi>
<mi>p</mi>
<mspace width="1em"></mspace>
<mspace width="thickmathspace"></mspace>
<mo stretchy="false">⟹<!-- ⟹ --></mo>
<mspace width="thickmathspace"></mspace>
<mspace width="1em"></mspace>
<mn>0</mn>
<mo>≤<!-- ≤ --></mo>
<mi>b</mi>
<mi>p</mi>
<mo>−<!-- − --></mo>
<mi>z</mi>
<mi>q</mi>
<mo>=:</mo>
<msup>
<mi>p</mi>
<mo>′</mo>
</msup>
<mspace width="thinmathspace"></mspace>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle zq\leq bp\quad \implies \quad 0\leq bp-zq=:p'\,.}</annotation>
</semantics>
</math></span><img src="./8aa2c2e589c10809a602f66f0dd634f1b692a91b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:36.514ex; height:2.843ex;" alt="{\displaystyle zq\leq bp\quad \implies \quad 0\leq bp-zq=:p'\,.}" loading="lazy"></span></dd></dl>
<p>Because all these remainders <span class="texhtml mvar" style="font-style:italic;">p</span> are non-negative integers less than <span class="texhtml mvar" style="font-style:italic;">q</span>, there can be only a finite number of them with the consequence that they must recur in the <code>while</code> loop. Such a recurrence is detected by the <a href="Associative_array" title="Associative array">associative array</a> <code>occurs</code>. The new digit <span class="texhtml mvar" style="font-style:italic;">z</span> is formed in the yellow line, where <span class="texhtml mvar" style="font-style:italic;">p</span> is the only non-constant. The length <span class="texhtml mvar" style="font-style:italic;">L</span> of the repetend equals the number of the remainders (see also section <a href="#Every_rational_number_is_either_a_terminating_or_repeating_decimal">Every rational number is either a terminating or repeating decimal</a>).
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Decimal_representation" title="Decimal representation">Decimal representation</a></li>
<li><a href="Full_reptend_prime" title="Full reptend prime">Full reptend prime</a></li>
<li><a href="Midy's_theorem" title="Midy's theorem">Midy's theorem</a></li>
<li><a href="Parasitic_number" title="Parasitic number">Parasitic number</a></li>
<li><a href="Trailing_zero" title="Trailing zero">Trailing zero</a></li>
<li><a href="Unique_prime" class="mw-redirect" title="Unique prime">Unique prime</a></li>
<li><a href="0.999..." title="0.999...">0.999...</a>, a repeating decimal equal to one</li>
<li><a href="Pigeonhole_principle" title="Pigeonhole principle">Pigeonhole principle</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text">Courant, R. and Robbins, H. <i>What Is Mathematics?: An Elementary Approach to Ideas and Methods, 2nd ed.</i> Oxford, England: Oxford University Press, 1996: p. 67.</span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFBeswick2004" class="citation cs2">Beswick, Kim (2004), "Why Does 0.999... = 1?: A Perennial Question and Number Sense", <i>Australian Mathematics Teacher</i>, <b>60</b> (4): <span class="nowrap">7–</span>9</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://math.stackexchange.com/questions/895611/lamberts-original-proof-that-pi-is-irrational">"Lambert's Original Proof that $\pi$ is irrational"</a>. <i>Mathematics Stack Exchange</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-19</span></span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text">Conférence Intercantonale de l'Instruction Publique de la Suisse Romande et du Tessin (2011). <i>Aide-mémoire</i>. Mathématiques 9-10-11. LEP. pp. 20–21.</span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text">For a base <i>b</i> and a divisor <i>n</i>, in terms of group theory <a href="Carmichael_function#Order_of_elements_modulo_n" title="Carmichael function">this length</a> divides
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \operatorname {ord} _{n}(b):=\min\{L\in \mathbb {N} \,\mid \,b^{L}\equiv 1{\bmod {n}}\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>ord</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>b</mi>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mo movablelimits="true" form="prefix">min</mo>
<mo fence="false" stretchy="false">{</mo>
<mi>L</mi>
<mo>∈<!-- ∈ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">N</mi>
</mrow>
<mspace width="thinmathspace"></mspace>
<mo>∣<!-- ∣ --></mo>
<mspace width="thinmathspace"></mspace>
<msup>
<mi>b</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>L</mi>
</mrow>
</msup>
<mo>≡<!-- ≡ --></mo>
<mn>1</mn>
<mrow class="MJX-TeXAtom-ORD">
<mo lspace="thickmathspace" rspace="thickmathspace">mod</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</mrow>
<mo fence="false" stretchy="false">}</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \operatorname {ord} _{n}(b):=\min\{L\in \mathbb {N} \,\mid \,b^{L}\equiv 1{\bmod {n}}\}}</annotation>
</semantics>
</math></span><img src="./7c89f02c770bea80606bb6ad11a7fb832c81083f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:39.836ex; height:3.176ex;" alt="{\displaystyle \operatorname {ord} _{n}(b):=\min\{L\in \mathbb {N} \,\mid \,b^{L}\equiv 1{\bmod {n}}\}}" loading="lazy"></span></dd></dl>
(with <a href="Modular_arithmetic" title="Modular arithmetic">modular arithmetic</a> <span class="nowrap">≡ 1 mod <i>n</i></span>) which divides the Carmichael function
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda (n):=\max\{\operatorname {ord} _{n}(b)\,\mid \,\gcd(b,n)=1\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>λ<!-- λ --></mi>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
<mo>:=</mo>
<mo movablelimits="true" form="prefix">max</mo>
<mo fence="false" stretchy="false">{</mo>
<msub>
<mi>ord</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msub>
<mo>⁡<!-- ⁡ --></mo>
<mo stretchy="false">(</mo>
<mi>b</mi>
<mo stretchy="false">)</mo>
<mspace width="thinmathspace"></mspace>
<mo>∣<!-- ∣ --></mo>
<mspace width="thinmathspace"></mspace>
<mo movablelimits="true" form="prefix">gcd</mo>
<mo stretchy="false">(</mo>
<mi>b</mi>
<mo>,</mo>
<mi>n</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mn>1</mn>
<mo fence="false" stretchy="false">}</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \lambda (n):=\max\{\operatorname {ord} _{n}(b)\,\mid \,\gcd(b,n)=1\}}</annotation>
</semantics>
</math></span><img src="./51a96b36d6386d94b9865d41df7076a48dd7b003.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:38.042ex; height:2.843ex;" alt="{\displaystyle \lambda (n):=\max\{\operatorname {ord} _{n}(b)\,\mid \,\gcd(b,n)=1\}}" loading="lazy"></span></dd></dl>
which again divides <a href="Euler's_totient_function" title="Euler's totient function">Euler's totient function</a> <i>φ</i>(<i>n</i>).</span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFVuorinen" class="citation web cs1">Vuorinen, Aapeli. <a rel="nofollow" class="external text" href="https://www.aapelivuorinen.com/blog/2017/03/06/rational-numbers-repeating-decimal-expansions/">"Rational numbers have repeating decimal expansions"</a>. <i>Aapeli Vuorinen</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-23</span></span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20231223234518/https://www.sjsu.edu/faculty/watkins/repeatingdecimals.htm">"The Sets of Repeating Decimals"</a>. <i>www.sjsu.edu</i>. Archived from <a rel="nofollow" class="external text" href="https://www.sjsu.edu/faculty/watkins/repeatingdecimals.htm">the original</a> on 23 December 2023<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-23</span></span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite id="CITEREFRoRi2016" class="citation web cs1">RoRi (2016-03-01). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20231223234333/https://www.stumblingrobot.com/2016/02/29/prove-that-every-repeating-decimal-represents-a-rational-number/">"Prove that every repeating decimal represents a rational number"</a>. <i>Stumbling Robot</i>. Archived from <a rel="nofollow" class="external text" href="https://www.stumblingrobot.com/2016/02/29/prove-that-every-repeating-decimal-represents-a-rational-number/">the original</a> on 23 December 2023<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-23</span></span>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite id="CITEREFGray2000" class="citation journal cs1">Gray, Alexander J. (March 2000). "Digital roots and reciprocals of primes". <i><a href="Mathematical_Gazette" class="mw-redirect" title="Mathematical Gazette">Mathematical Gazette</a></i>. <b>84</b> (499): 86. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.2307%2F3621484">10.2307/3621484</a>. <a href="JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&nbsp;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/3621484">3621484</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:125834304">125834304</a>. <q>For primes greater than 5, all the digital roots appear to have the same value, 9. We can confirm this if...</q></cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text">Dickson, L. E., <i>History of the Theory of Numbers</i>, Volume 1, Chelsea Publishing Co., 1952.</span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text">William E. Heal. Some Properties of Repetends. Annals of Mathematics, Vol. 3, No. 4 (Aug., 1887), pp. 97–103</span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text">Albert H. Beiler, <i>Recreations in the Theory of Numbers</i>, p.&nbsp;79</span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text">Mitchell, Douglas W., "A nonlinear random number generator with known, long cycle length", <i><a href="Cryptologia" title="Cryptologia">Cryptologia</a></i> 17, January 1993, pp. 55–62.</span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><a href="L._E._Dickson" class="mw-redirect" title="L. E. Dickson">Dickson, Leonard E.</a>, <i><a href="History_of_the_Theory_of_Numbers" title="History of the Theory of Numbers">History of the Theory of Numbers</a>, Vol. I</i>, Chelsea Publ. Co., 1952 (orig. 1918), pp. 164–173.</span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text">Armstrong, N. J., and Armstrong, R. J., "Some properties of repetends", <i>Mathematical Gazette</i> 87, November 2003, pp. 437–443.</span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><span class="citation mathworld" id="Reference-Mathworld-Repeating_Decimal"><cite id="CITEREFWeisstein" class="citation web cs1"><a href="Eric_W._Weisstein" title="Eric W. Weisstein">Weisstein, Eric W.</a> <a rel="nofollow" class="external text" href="https://mathworld.wolfram.com/RepeatingDecimal.html">"Repeating Decimal"</a>. <i><a href="MathWorld" title="MathWorld">MathWorld</a></i>.</cite></span></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-31" href="https://en.wikipedia.org/wiki/?title=Repeating_decimal&amp;oldid=1303536775">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>